MALE - Former Maldives president Mohamed Nasheed was convicted of a terrorism charge by a criminal court and sentenced to 13 years in prison on Friday.

The three-judge bench unanimously found Nasheed guilty of ordering the arrest of a chief judge in January 2012 when he was leader of the Indian Ocean archipelago. ‘Nasheed is found guilty of arresting and illegally detaining judge Abdulla Mohamed,’ judge Abdulla Didi told the court in a verdict just before midnight.

The ruling came four days after Nasheed’s lawyers quit in protest against what they called a biased trial aimed at destroying his political career.

Nasheed, the country’s first democratically elected leader, was originally cleared of the charge last month but a few days later the prosecutor general had him re-charged and arrested under tough anti-terror laws. The United States and regional power India had voiced concern over the charges and attempts to keep him out of politics. The controversial trial went on despite widespread criticism, with current President Abdulla Yameen denying that the move was politically motivated.

Hundreds of supporters have been protesting in the tiny capital island Male on a regular basis since Nasheed’s arrest last month. Nasheed resigned as Maldives leader in February 2012 after a mutiny by police and troops that followed weeks of protests over the arrest of judge Mohamed on corruption allegations. He has maintained that he was innocent and he was wrongfully charged. Nasheed was denied medical attention while in police custody, his party has said.

‘He is sentenced to 13 years on terrorism charges,’ said Hamid Abdul Ghafoor, spokesman for Nasheed’s Maldivian Democratic Party told Reuters. An official in the office of Abdulla Yameen, president in the Indian Ocean island state, confirmed the sentence.

The case dates back to 2012 when Nasheed ruled as president in the Maldives and ordered the arrest of a judge. Nasheed has said he was forced to resign at gunpoint over the judicial row in 2012, and his allies say he was ousted in a coup.