A lawyer says Maldives' former president has denied in court that he ordered the arrest of a top judge three years ago.

The former president, Mohamed Nasheed, also told a Criminal Court hearing Thursday that the charge against him is politically motivated, said lawyer Hisaan Hussain. He objected to two judges on a three-member bench hearing the case because they testified against him at initial inquiries.

Nasheed was arrested Sunday for what authorities say was his order to arrest Criminal Court Chief Judge Abdulla Mohamed when he was president in 2012. The alleged order led to weeks of public protests before Nasheed resigned from the presidency.

Nasheed became the Indian Ocean archipelago nation's first democratically elected president in 2008, ending a 30-year autocracy.