Mohamed Nasheed, ex-president of the Maldives, has been convicted of terrorism and sentenced to 13 years in prison. The three-judge criminal court unanimously found Nasheed guilty of arresting and illegally detaining judge Abdulla Mohamed. 

Nasheed ordered the arrest of the chief judge back in January 2012 when he was the island nation's president. Nasheed has denied ordering the arrest. According to his supporters, the charges are false and are aimed at pushing him out as challenger against President Yameen Abdul Gayoom in the 2018 presidential elections. 

Once the judges read their verdict to the court, Nasheed was taken to Dhoonidhoo prison, near the capital Male.

The former president's office sent out a statement, saying, "President Nasheed was repeatedly denied legal representation, denied the right to appeal, his defense witnesses were prevented from taking the stand, and prosecution witnesses were routinely coached by the judges and the police."

In court Nasheed accused the judges of corruption and accepting bribery money.

"These judges have no fear of the day of judgment, and no shame in this world," he said. "The consequence of their actions is injustice to the public, and the thwarting of this country's development."

The Maldivian Democratic Party said the verdict dealt a blow to the country's democracy. Nasheed was the country's first democratically elected leader after the country was ruled for 30 years by former President Maumoon Abdul Gayoom.

"Democracy jailed for 13 years on March 13, 2015," party spokeswoman Shauna Aminath said. "Nothing good will come out of this. It's a sad, sad, sad day for the Maldives."

During the trial Nasheed's lawyers quit in protest against what they called a biased trial.

Nasheed had initially been cleared of charges last month. A few days later the prosecutor general had Nasheed arrested and charged again but this time for violating anti-terror laws.

The trial had been criticized by the United States and India. President Abdulla Yameen denied the arrest had been politically motivated.

Nasheed resigned as the country's president in February 2012 after weeks of protests over the arrest of Judge Mohamed on corruption allegations and a mutiny by the country's police and soldiers.

The judge was arrested after releasing a detained opposition politician.