The anti-immigration party of veteran center-right leader Janez Jansa has emerged as the largest party in Slovenia's parliamentary election on Sunday but may struggle to command a majority, according to nearly final results.
With some 98 percent of votes counted, Jansa's SDS party looks to have secured just over 25 percent -- giving it 25 seats in the 90-seat assembly -- and the "anti-establishment" LMS party of comedian-turned-politician Marjan Sarec in second place on 12.7 percent and 13 seats, the State Election Commission said.
During the campaign, Jansa made common cause with fellow right-wing firebrand Hungarian Prime Minister Viktor Orban and effectively evoked memories of more than 500,000 migrants who crossed Slovenia in late 2015 and early 2016 -- although all except a handful of them continued on to northern Europe.
In a televised statement on Sunday evening, delivered with little triumphalism, the 59-year-old Jansa said his party's "door for talks and coalitions is open" to all other parties.
"We are ready to start serious talks based on the program we have been working hard on," he said.
He reiterated his anti-migrant position saying migration was "the most serious challenge according to most Europeans."
The only party which has so far said it would work with Jansa, the center-right Nova Slovenija, has won just 7.1 percent and seven seats, leaving the two parties short of the 46 needed for a majority.
That leaves the second place LMS party potentially with a crucial role to play.
Speaking to the POP TV station after polls closed, Sarec said he was "very happy" with the results, hinting that it could give him the opportunity to band with other parties to keep Jansa out of power.
During the campaign Sarec said that Jansa's anti-immigration rhetoric and his appearances with Orban "crossed all red lines."
On Sunday evening Sarec repeated his opposition to working with Jansa, saying: "We have said it so many times in public that we would not be trustworthy if we did."
Sarec had been criticized for his vague platform during the campaign but recently told AFP his party "has many things in common with (French President Emmanuel) Macron's position, a sensible, centrist orientation."
The center-left Social Democrats have finished in third place on just under 10 percent followed by the SMC party of outgoing prime minister Miro Cerar on 9.7 percent and the left-wing Levica party with 9.2 percent.
Early elections were called in March after Cerar threw in the towel following months of public-sector strikes and internal wrangling within his coalition, with the last straw coming when a supreme court verdict on a flagship infrastructure project went against the government.
On Sunday Cerar told POP TV that the "results show that we (SMC) remain an important player on the political stage and we will continue fulfilling our role with responsibility."
Just over 51 percent of the 1.7 million Slovenians eligible to vote turned out.
Jansa's political career stretches back to the country's struggle for independence from Yugoslavia and has already seen its fair share of drama. In 2013 he was forced to step down from a second term as prime minister over a corruption scandal and ran in the 2014 elections from jail -- the verdict was later overturned.
Like right-wing leaders elsewhere he has adopted a combative presence on Twitter and has used it to defend his alliance with Orban.
"Thanks to its (migration) policy, Hungary is a safe country while Belgium, due to its wrong policy, isn't," read a recent tweet from Jansa, who first served as prime minister from 2004-08.
Almost 500,000 migrants crossed Slovenia in late 2015 and early 2016 along the so-called Balkan route.
During the campaign, Jansa effectively evoked memories of the crisis to his advantage despite the fact that all except a handful of the migrants continued to northern Europe.
For the first time in over a decade, the elections took place against a backdrop of strong economic growth rather than financial crisis or recession.
But Cerar's government did not reap any political benefit from the turnaround, with his rivals focusing on growing hospital waiting lists and demands for higher pensions and wages and a better business environment.
Analysts say that while the parties may prove more open to cooperation once the results are counted, in the near future political instability may well persist, whether under a right-wing, Jansa-led government or one from the center-left.
Slovenia, once part of the former Yugoslavia and the native home of U.S. first lady Melania Trump, joined the EU in 2004. It has used the euro as its official currency since 2007.