The court appointed Filip as interim president to allow him to sign a decree for an election
A Moldovan court temporarily relieved President Igor Dodon of his duties on Sunday to allow a stand-in to call a snap election, deepening a standoff between rival political parties over the formation of a new government after months of deadlock.
Dodon's replacement, former prime minister Pavel Filip, immediately announced a snap election for September, while thousands of supporters of Filip's party rallied in the capital, Chisinau.
The crisis threatens more instability in one of Europe's smallest and poorest nations of 3.5 million people, where entrenched corruption and low living standards have pushed many citizens to emigrate to Russia or wealthier European countries.
Dodon's Russian-backed Socialist party had on Saturday announced it was forming a coalition government with the pro-European Union ACUM bloc, an unlikely alliance designed to keep a party run by tycoon Vladimir Plahotniuc out of power.
Plahotniuc's Democratic Party of Moldova said the new administration had tried to usurp power at Russia's behest, criticising Dodon's refusal to dissolve parliament after parties missed a court-mandated June 7 deadline to form a government.
More than 10,000 of Plahotniuc and Filip's party supporters held a protest, calling Dodon a "traitor" and demanding his resignation.
Dodon said the court was not politically independent and accused the Democrats of trying to cling to power. He called on the international community to step in.
"Moldovan citizens with different views on domestic and foreign policy can unite for the sake of a common goal: liberation of the Republic of Moldova from the criminal, dictatorial regime," Dodon said in a statement.
"We have no choice but to appeal to the international community to mediate in the process of a peaceful transfer of power and/or to call on the people of Moldova for an unprecedented mobilization and peaceful protests."
The court appointed Filip as interim president to allow him to sign a decree for an election. Filip said Dodon had not fulfilled his duties by failing to dissolve parliament, and called it an attempt to stage a "coup."
Amid signs of trouble brewing on Saturday, the EU's spokeswoman called for "calm and restraint", and for Moldova to respect the rule of law and democracy. Russia urged parties to avoid destabilization.
ACUM leader Maia Sandu, a former education minister and World Bank adviser, had been appointed prime minister on Saturday. But a court struck down her appointment and that of a Socialist party-nominated parliament speaker.
Plahotniuc's party supporters pitched tents in front of ministries and state institutions on Saturday night.
"The tents pitched yesterday are proof that the Democratic Party wants to use law enforcement bodies to throw the country into chaos to protect a single person - Plahotniuc," Sandu said in parliament on Sunday.
"They do not want to ensure the peaceful transition of power. The orders given now by Plahotniuc are illegal," she said.
Moldova has been dogged by political instability and corruption, especially since a scandal known as the "theft of the century" emerged in 2014-2015 in which $1 billion, around an eighth of its economic output, was pilfered from three banks.
The tiny ex-Soviet republic is squeezed between Ukraine and EU member Romania. Politically divided, some of its voters favour closer ties with the EU or even reunification with Romania, while others prefer closer ties to Russia.
The EU forged a deal on closer trade and political ties with Moldova in 2014 and showered it with aid but has become increasingly critical of Chisinau's track record on reforms.
An election in February produced a hung parliament and set the stage for months of coalition negotiations.
On Saturday the deputy chief of the Democratic Party, Andrian Candu, told Reuters that Dodon, the former Socialist party head, had approached the Democrats with a coalition offer on terms set by Moscow.
The coalition terms included implementing a longstanding plan to turn Moldova into a federal state that would give special recognition to the separatist region of Transdniestria, which wants to merge with Russia.
Opponents of such a plan say it would give Transdniestria, and by extension Russia, an outsize say in how Moldova is run.
Dodon has said the idea to federalise Moldova had come from Plahotniuc, which the latter had offered Moscow in exchange for Russian criminal cases against him being dropped. A Russian statement also said the idea had come from Plahotniuc.