Moldova's Democratic Party (DPM), chaired by controversial oligarch Vladimir Plahotniuc, resigned from power on Friday, paving the way for a coalition between pro-EU and pro-Russian parties.
"Given the need to unblock the crisis that the country is going through, the Democratic party has decided to retreat from power by having the government resign," the party said in a statement.
It added however that any new government would be functioning "illegally" and renewed its call for snap elections.
The small, impoverished, eastern European state has been embroiled in a political crisis since inconclusive elections in February.
The pro-Russian Socialist Party and the pro-EU ACUM bloc — composed of the Dignity and the Truth Platform Party and the Party of Action and Solidarity — claimed the first two places but neither got enough seats to form a majority.
Instead, DPM, which came in third, was tasked with governing until a government could be formed, thanks to an alliance with liberals and some former communists.
It all came to a head last week when DPM refused to resign despite parliament approving a coalition government between the Socialist Party and ACUM with the Socialist Party's Igor Dodon as president and ACUM's Maia Sandu as prime minister.
It argued that the two parties had not respected the three-month deadline imposed by the country's constitution to form a government and was backed by the Constitutional Court.
However, Dodon and Sandu assumed office and for the past seven days, Moldova has been run by two parallel governments, raising fears of a potential escalation.
'Extremely important victory'
In an address on Friday, Dodon described the DPM resignation as a "symbolic but extremely important victory". He also called on the Constitutional Court to amend its ruling — warning that he would ask parliament to replace the court's judges if it failed to do so — and demanded that the country's top prosecutor and the head of the anti-corruption body both resign.
Sandu, a Harvard-educated former World Bank adviser, also welcomed DPM's resignation on Facebook but said that "abusive actions" including the "blockade of state institutions and blackmail of citizens" as well as "the use of a paramilitary structure to create fear" by Plahotniuc and his followers "will not remain unpunished".
DMP confirmed in a statement that Plahotniuc had "left the country for a few days".
In an interview with the Reuters news agency, Sandu laid out some of her government's priorities: fight corruption, sack dishonest officials, make the electoral system fairer and get foreign aid flowing.
"The biggest challenge of the country is that people are leaving. It's the young people who are leaving," she said.
She said her government will adhere to Moldova's current international agreements, including a political and trade pact with the EU rolled out in 2014, adding that she is keen for the country to receive two outstanding tranches of aid from the International Monetary Fund before the current programme expires in November.
She also conceded that the Socialist party and ACUM make for an unlikely alliance.
"This is not a natural alliance. There is no question about it, and probably half a year ago nobody would have said that this could happen," she said.
The US said in a statement that it is "encouraged that both the new coalition and the former government have committed to a peaceful transfer of power" and urged "for restraint during this time of transition."
Russia has also welcomed the latest development while the EU said it was "ready to work with the democratically legitimate government".