By Angel Krasimirov and Tsvetelia Tsolova
SOFIA (Reuters) - Bulgarian Prime Minister Boiko Borisov resigned on Monday after his center-right GERB party candidate lost Sunday's presidential election to a political novice backed by the opposition Socialists who favors improved ties with Russia.
Bulgaria now almost certainly faces a parliamentary election in the spring but is likely to end up again with a fragmented assembly that will struggle to agree on a stable coalition capable of implementing vital reforms, political analysts said.
Rumen Radev, a former air force commander, won the largely ceremonial presidency on the back of voters' impatience with Borisov's failure to tackle corruption and raise living standards faster in the European Union's poorest member state.
Partial official results showed Radev had won nearly 60 percent of the vote against 36 percent for GERB's Tsetska Tsacheva, a parliamentary speaker seen as loyal to Borisov.
The outcome is also a rebuff for the EU, which Bulgaria joined in 2007, and a triumph for Moscow, Sofia's historic ally, as it tries to reassert its influence in eastern Europe.
In the election campaign, Radev had argued that Bulgaria needs to be pragmatic in balancing the requirements of its EU and NATO memberships with the need to improve ties with Russia, the Black Sea nation's communist-era overlord.
Radev also criticized the EU's handling of the migrant crisis, which has lapped against Bulgaria's southeastern border with Turkey and prompted Sofia to build a wall there.
Russian President Vladimir Putin congratulated Radev on Monday and said his win would create an impetus for political dialogue and expanded cooperation, the Kremlin said.
"SUCCESS FOR RUSSIA"
"Many of the political parties - the Socialists, the nationalists and probably new populist leaders that are likely to emerge - will increase pro-Russia talk to win support," said Kiril Avramov of New Bulgarian University.
"For a very long time NATO and the EU were closed topics. Now they are have become topics of debate and this is already a success for Russia."
The Balkan nation of 7.2 million depends mostly on Moscow for its energy supplies and military kit, while Russian tourists are an important source of revenue. Bulgarians also share the Cyrillic alphabet and Orthodox Christianity with their giant neighbor across the Black Sea.
While the prime minister and government hold most power in Bulgaria, the president can help to shape public opinion, appoints ambassadors and can veto laws once.
Borisov, a charismatic, tough-talking former bodyguard with a black belt in karate, has long dominated Bulgarian politics and opinion polls suggest GERB will again emerge as the biggest party after an early parliamentary election.
"Despite Tsacheva's defeat, GERB remains the strongest political force and it is the favorite to win the early elections," said Parvan Simeonov, a political analyst with Gallup International in Sofia.
But as in 2014, when Borisov returned to power after toppling a Socialist-led government amid anti-graft protests, GERB may struggle to build a durable government.
Borisov has said he will not try to seek support to form a new government within the current parliament and the Socialists have also ruled out any such move.
The outgoing president, Rosen Plevneliev, will have to appoint a caretaker government until an early election is held unless a new cabinet can be formed by existing groupings. But under the Bulgarian constitution, Plevneliev would not be able to dissolve the current chamber.
Radev said he had agreed with the outgoing president on Monday to discuss the appointment of an interim government.
A pro-Russian candidate also won a presidential election on Sunday in ex-Soviet Moldova, which borders Bulgaria's northern neighbor Romania. Moldova is not in the EU or NATO.
(Additional reporting by Vladimir Soldatkin in Moscow; Editing by Justyna Pawlak and Gareth Jones)