Media playback is unsupported on your device Media caption Mohamed Nasheed complained he was hurt as he was dragged along the floor, as Charles Haviland reports

Police in the Maldives have dragged ex-President Mohamed Nasheed into court to face charges for ordering the arrest of a top judge while still leader.

Mr Nasheed, now leader of the main opposition party, was arrested on Sunday under anti-terror laws.

He complained of being manhandled by police after he had ignored attempts to prevent him from speaking to reporters outside court.

Mr Nasheed, who was denied bail, was later seen with his arm in a sling.

His Maldivian Democratic Party said it "deplore[d] the blatant denial of due process" by the Maldives prosecutor-general and called for his immediate release.

The court gave him three days to appoint a lawyer.

Image copyright AFP Image caption The police tried to stop him speaking to reporters outside the court building

Image copyright AFP Image caption But he was dragged into the courtroom after ignoring their calls

His advisers told the BBC that he wants to appeal but he faces bureaucratic obstacles in doing so.

Maldives Foreign Minister Dunya Maumoon told the BBC that the case concerned the "kidnapping and abduction of an innocent person" and such an activity was "linked to terrorism in the Maldives legal system".

She said Mr Nasheed was being kept in custody because he had a "history of avoiding and evading the courts".

Mr Nasheed is a former human rights campaigner who was the island nation's first democratically elected leader.

His arrest adds to growing instability in the small coral atoll nation, the BBC's Charles Haviland reports.

President Abdullah Yameen, elected in 2013, has recently become alienated from key former colleagues.

He arrested his defence minister, accusing him of plotting a coup, and has been deserted by another former ally, a powerful resort tycoon who has now joined forces with Mr Nasheed. He has also sacked the chief justice and another judge.