Less than a day after the arrest of the two judges, the remaining three judges rescinded its ruling to release the political leaders referring to the concerns raised by president Yameen in the letters he had sent to the chief justice hours before state of emergency was declared.
Yameen earlier ordered the arrest of the chief justice, another judge Ali Hameed, and the registrar of the court, Hassan Saeed.
The court's shock move in support of the political dissidents on Thursday also included an order for the government to restore the seats of 12 legislators sacked for defecting from Mr Yameen's party.
India has asked the "Government of Maldives to respect and abide by the order of the apex court" and said it "wishes to see a stable, peaceful and prosperous Maldives".
The Indian Ocean nation was thrown into turmoil when the Supreme Court ordered several jailed politicians to be freed last week - something the current leader did not agree with.
The US openly said, "The world is watching".
Maldives president says judges plotted to overthrow him
On Sunday evening, opposition Members of Parliament held a joint meeting and chose to lead a massive protest against President Mohammed Yameen.Demanding justice and a return of the rule of law, they called for the immediate release of all political prisoners.
The Maldives Supreme Court on Tuesday revoked its earlier order to release nine high-profile political prisoners.
The government did not comment on soldiers entering the Supreme Court building or on Gayoom's arrest, but the president's main rival, who lives in exile, urged people not to obey what he called an "unlawful order".
"The US is troubled and disappointed by reports that Maldivian President Yameen has declared a State of Emergency, which gives sweeping powers to security forces to arrest and detain suspects, bans public gatherings, imposes travel restrictions, and suspends parts of the Maldivian Constitution..."
Gayoom was president from 1978 to 2008, when the Maldives became a multiparty democracy. "I had to declare an emergency because there was no other way to investigate these judges", Yameen said in a televised address to the nation.
Former president Maumoon Abdul Gayoom, who has allied himself with the Opposition, was also detained at home.
Say Goodbye To Picking Up A CD In Stores
As it stands, Target pays music suppliers within 60 days of receiving inventory, and then pays to ship back unsold CDs for credit. Music lovers can still order CDs online, buy them at other major retailers, such as Walmart, or at some of local record shops.