Police in the Maldives capital, Male, arrested former President Mohamed Nasheed Tuesday, more than a week after he exited the Indian High Commission in the capital where he had taken refuge Feb. 13.

Nasheed, the first democratically elected president of the country, was detained for ignoring two arrest warrants and for failure to attend a court hearing on charges of illegally detaining a judge during his tenure in office. Nasheed had ordered the judge’s arrest on charges of deliberately obstructing investigations of political figures linked to a previous government.

The Maldivian government said Nasheed was "taken into custody" on a court order and would be taken before a judge in a couple of days, AFP news agency reported.

An unconfirmed report said clashes erupted between his supporters and police when they came to arrest him.

He faces a maximum penalty of three years imprisonment or banishment to a remote island if found guilty of the charges.

He left the Indian diplomatic mission Feb. 23, following talks between high-profile Indian and Maldivian government officials.

“The former President had come to the Indian Mission in Male Feb. 13 on his own and had decided to leave on his own. It is hoped that with this development the former President will resume his social and political life,” a statement by the Indian Ministry of External Affairs had said.

“India has maintained broad-based contacts with all political parties and democratic institutions in the Maldives without interfering in its internal affairs,” the statement added, according to the leading Indian daily the Hindu.

Indian media reports said both the governments reached an informal deal, though details of the “deal” were not announced.

Nasheed had been a democracy activist and political prisoner before becoming president in the first multiparty election in 2008 that ended former President Maumoon Abdul Gayoom's 30-year autocratic rule.

Nasheed's Maldivian Democratic Party maintains that the case against him is aimed at sabotaging his campaign efforts for the upcoming presidential elections, slated to be held Sept. 7.

The Maldives was thrown into political turmoil in February 2012, when Nasheed was ousted in a military coup.

Maldivian President Waheed, who had been vice-president to Nasheed, replaced his predecessor following the ouster.

President Waheed maintains that the court's case against Nasheed has nothing to do with his government and that “rule of law means nobody is above the law.”