Bulgaria's centre-right Prime Minister Boyko Borisov has tendered his resignation, after a Russia-friendly Socialist candidate defeated his nominee in the presidential election.
Former air force commander Rumen Radev, a political novice, won Sunday's election with about 59% of the vote.
He wants the EU to drop its sanctions on Russia and seeks closer ties with Moscow to help Bulgaria's struggling economy. It is the EU's poorest state.
Bulgaria used to be in the Soviet bloc.
Mr Borisov had backed the centre-right speaker of parliament, Tsetska Tsacheva, who won just over 35% of the vote.
The Bulgarian president has a big role in defence and foreign policy, but most key decisions are taken by the government. He has the power to send legislation back to parliament.
Mr Radev's triumph reflected widespread discontent with the government's poor record on tackling corruption and poverty.
His success came on the same day as that of Igor Dodon, a pro-Russian Socialist elected president of Moldova.
New coalition talks
The coalition that Mr Borisov formed upon re-election in 2014 relies on the support of centre-left and nationalist parties.
Outgoing President Rosen Plevneliev is expected to chair negotiations to form a caretaker government, but early elections are expected as soon as March.
Mr Radev, 53, launched his presidential bid as an independent candidate, supported by a group of citizens, and only later got Socialist Party (BSP) backing. He will be sworn in as president in January.
He reached out to nationalists by opposing the EU's resettlement policy for refugees. That policy is also rejected by some other ex-communist EU member states in Eastern and Central Europe.
Mr Radev spent 27 years rising through the ranks of the Bulgarian air force. He also received training at the US Air War College in Alabama. Bulgaria joined Nato in 2004, along with other ex-Soviet bloc countries.
"Until recently, I flew a Soviet jet fighter. I graduated from a US academy. But I am a Bulgarian general. My cause is Bulgaria," he said.
A Bulgarian political analyst, Dimitar Bechev, says Mr Radev's socially conservative platform is not far removed from Mr Borisov's.
"His message will be that Bulgaria can have its cake and eat it - i.e. be a loyal partner in the EU and Nato, while reaching out to Russia," he said in the London School of Economics Europp blog.
"That is not very different from the position advocated by Borisov." The departing prime minister was formerly Bulgaria's police chief.
Mr Bechev says tensions may emerge between Mr Radev and Vice President-elect Iliana Iotova, who is a Bulgarian MEP and a BSP insider.
Media see gains for Russia, by BBC Monitoring:
Media across Europe see the election of Igor Dodon and Rumen Radev as the Moldovan and Bulgarian presidents, respectively, as a victory for Russia.
Romanian TV describes Mr Dodon as "pro-Russian and anti-EU" while a headline on Romanian website Hotnews.ro reads: "Romania gripped more tightly in Russian vice."
Ukraine, which lost the territory of Crimea to Russia in 2014, is concerned. The popular channel, One Plus One TV, notes that Mr Dodon "says Crimea belongs to Russia".
Ukrainian fears are also reflected in social media. Prominent journalist Vitaly Portnikov suggests Russia is the winner in Moldova and Bulgaria. "Sunday belonged to the Kremlin," Portnikov tweeted.
In Germany, the public broadcaster ARD commented: "Political landslide in Bulgaria: More Moscow, less Brussels."
Belgium's L'Avenir newspaper has a headline reading: "Bulgaria comes closer to Russia". And in France, the headline in L'Express simply says: "Bulgarians and Moldovans elect pro-Russian presidents."