Last week, the Supreme Court ordered the release of a group of opposition politicians. It also ruled that the 2015 trial of former President Mohamed Nasheed, who is living in exile, had been unconstitutional.
The country's police commissioner said he would enforce the court's ruling - in response, the government of President Yameen sacked him.
The army has now been ordered to resist any attempt to impeach or remove President Yameen.
The crisis escalated on Monday when a state of emergency was declared, giving a range of powers to the security forces to make arrests, and banning public gatherings.
Mr Nasheed called on India and the US to help remove President Yameen, who had "illegally" declared martial law, he said.
In a tweet, Mr Nasheed asked for India to send an envoy to help release the political prisoners, and the US to impose financial sanctions on the Maldives' leaders.
Former President Maumoon Abdul Gayoom, who has allied himself with the opposition, was detained at his home.
In a video posted online the ex-president addresses his supporters (in Divehi), saying that he has not "done anything to warrant arrest" and urging them to "remain strong".
Police were also dispatched to the Supreme Court.Published: 2018-02-06 14:23:31