Bulgaria's center-right GERB party narrowly won a parliamentary election on Sunday, giving it a chance to form another government after leader Boiko Borisov resigned as prime minister in November, triggering the snap poll.
A count of votes by pollsters showed GERB had won between 32.9 percent and 33.2 percent of the vote, with the Socialist Party (BSP) trailing on 27.9 percent to 28.1 percent.
"The result of the vote show that GERB is obliged to form a government," said Borisov.
The election had been seen as a test of Bulgaria's loyalties to the European Union, which it joined in 2007, and to Russia, with which it has historic political and cultural links.
The opposition Socialists, who had pledged to improve ties with Russia even if it meant upsetting EU partners, doubled their share of the vote compared to the last election in 2014 but failed to overtake the strongly pro-EU GERB.
If Borisov succeeds in forming a new coalition, it is likely to maintain the tight fiscal policies that underpin the lev currency's peg to the euro.
GERB is likely to court the United Patriots nationalist alliance, which the count by pollsters put in third place with 8.9-9.5 percent of the vote, followed by ethnic Turkish party MRF on 9.3-10.6 percent.
The United Patriots has built its popularity on anger about the flow of migrants from the Middle East, Africa and Asia trying to reach Western Europe via the Balkans.
On Friday, supporters of the alliance blocked Bulgaria's border crossings with Turkey in an effort to stop buses bringing Bulgarian ethnic Turks to vote in Sunday's election.
Ahead of the election, Borisov signaled he hoped to include the Reformist Bloc in a GERB-led coalition government, but it was unclear on Sunday whether the rightist group would secure enough votes to make it into parliament. That could complicate coalition talks.
Most popular: China's Anti-Ship Missiles Threaten a New Arms Race
Socialist leader Kornelia Ninova conceded defeat in the election but said she would look at options for forming a government in case GERB cannot do so.
The Socialists had pledged during campaigning to raise wages and pensions as well as to oppose continuing EU sanctions against former Soviet-era overlord Russia.
That would complicate relations with Bulgaria's EU peers—already grappling with Britain's move to leave and the rise of anti-establishment parties across the bloc—as it gets ready to take over the EU's six-month rotating presidency in January.
Borisov resigned after a GERB candidate lost a presidential election in November to Rumen Radev, a Russia-friendly ally of the Socialists, and Bulgaria is currently being run by a caretaker administration.
More from Newsweek