The tiny island nation, whose palm-fringed sandy beaches are a major tourist draw, was plunged into crisis last week when the top court ordered the release of nine political prisoners, saying their convictions were flawed.
The ruling seemed to pave the way for the return of Mohamed Nasheed, the country's first democratically elected president and now leader of the opposition, two years after he left his homeland following a controversial terrorism conviction.
But Yameen refused to comply with the ruling and instead declared a 15-day state of emergency, curtailing the powers of the judiciary and the legislature, before ordering the arrest of the chief justice and another top judge.
Citing "the concerns raised by the president", the three remaining Supreme Court judges on Tuesday reversed last week's ruling, reinstating the convictions against Nasheed and eight others.
That means the leader of the opposition risks re-arrest if he returns as promised to run against Yameen in presidential elections due later this year in the honeymoon islands.
The streets of the capital Male were calm Wednesday with only a limited police presence and no sign of any repeat of the opposition protests that broke out last week.
But armed with draconian state of emergency laws, police continued to make arrests, detaining three relatives of Supreme Court judge Ali Hameed and the son of another exiled opposition leader Qasim Ibrahim -- among the nine mentioned in the original court order.
In the strongest international condemnation of the president since the crisis erupted, UN human rights chief Zeid Ra'ad Al Hussein on Wednesday accused Yameen of trying to destroy democracy.
"The suspension of several functions of the judiciary and Parliament, and the restrictions on a series of constitutional rights, create a dangerous concentration of power in the hands of the president," said Zeid.
"What is happening now is tantamount to an all-out assault on democracy."
He urged Yameen to lift the state of emergency declared Monday night and restore rule of law in the country whose image as an upmarket destination has been dented by the unrest.
"President Yameen has, to put it bluntly, usurped the authority of the state's rule-of-law institutions and its ability to work independently from the executive."
A statement on Yameen's website said his administration welcomed the Supreme Court's U-turn on the release of the political prisoners.
Former leader Nasheed has urged international intervention in the crisis, calling on regional superpower India to send in troops to free the judges and the political detainees.
But this is considered unlikely in a country where Chinese influence is on the rise.
Several countries have also warned against travel to the Maldives, which depends heavily on tourism, at the peak of the holiday season.
UN Secretary General Antonio Guterres on Tuesday urged the Male government to lift the state of emergency, saying he was "seriously concerned about the unfolding situation" in the Indian Ocean archipelago.
Yameen has had almost all the political opposition jailed since he came to power, in an escalating crackdown on dissent.
This week he ordered the arrest of his estranged half-brother, former president Maumoon Abdul Gayoom, who last year sided with the opposition.
Gayoom, President for 30 years until the country's first democratic elections in 2008 -- was previously the only senior opposition figure still at liberty in the Maldives.
Nasheed on Wednesday demanded his release, saying the 80-year-old former leader had not been eating since his arrest.
He also urged the release of Judge Hameed, who he said had been ill-treated in detention and was admitted to hospital Wednesday.
Hameed and Chief Justice Abdulla Saeed are accused of accepting bribes to impeach the president.
Opposition sources meanwhile linked the arrest of Qasim Ibrahim's son to allegations that Qasim was a key figure behind the latest attempt to topple the president.
Qasim ran for president in 2013 and currently heads the opposition Jumhooree Party.
He was one of four signatories of an opposition unity deal aimed at toppling President Yameen in April 2017.
Qasim was subsequently jailed for three years on a bribery charge, but was given asylum in Germany after travelling there for medical treatment.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.