The Maldives' parliament has passed a law that strips people serving prison sentences of their political party memberships, a rule critics say is designed to oust jailed former President Mohamed Nasheed from politics.

The law was passed by a 42-to-2 vote in the 85-seat parliament on Monday. Members of Nasheed's Maldivian Democratic Party protested and did not take part in the vote.

President Yameen Abdul Gayoom's party holds an overwhelming majority in Parliament and critics say he uses it against his opponents.

Parliament is also considering another bill that would strip Nasheed of his allowance and security protection as a former president.

Nasheed was sentenced to 13 years in prison earlier this month for ordering the arrest of a senior judge when he was in office three years ago. Nasheed's supporters say the charge was aimed at preventing him from contesting the 2018 presidential election.

Maldivian Democratic Party politician Evan Abdulla said the party has decided that the new law will not affect them and Nasheed will continue to be its leader.

Nasheed became the first democratically elected president of the Indian Ocean archipelago in 2008, ending 30 years of rule by Maumoon Abdul Gayoom.

Nasheed resigned amid public anger over the arrest of the judge in 2012 and the following year lost a presidential election to Yameen Abdul Gayoom, a half-brother of the former leader.

Source: AP