LJUBLJANA, Slovenia — A right-wing opposition party led by a former Slovenian prime minister won the most votes in Slovenia's parliamentary election Sunday, but not enough to form a government on its own, according to preliminary results.

The State Election Commission said after counting some 90 percent of the ballots that Janez Jansa's Slovenian Democratic Party received around 25 percent of the vote. The anti-establishment List of Marjan Sarec trailed in second place with over 12 percent.

The Social Democrats, the Modern Center Party of the outgoing prime minister, Miro Cerar, and the Left all received around 9 percent.

The preliminary tally means no party secured a majority in Slovenia's 90-member parliament, and the likely next step is negotiations to form a coalition government.

Slovenia was once part of the former Yugoslavia and is the native home of U.S. first lady Melania Trump. Bordering Austria, Croatia, Hungary, Italy and a slice of the Adriatic Sea, the country joined the European Union in 2004 and has used the euro as its official currency since 2007.

Jansa, who served as prime minister during 2004-2008 and 2012-2013, said at a press conference that his party is ready for postelection talks with other parliamentary parties.

"The SDS is open for cooperation," Jansa, using the Slovenian acronym for the party and adding that "times ahead will require cooperation."

But postelection negotiations could keep Jansa away from another term in office, since other groups suggested they were unwilling to form a ruling alliance with him.

Jansa is an ally of Hungary's anti-immigration prime minister, Viktor Orban. His election prowess with Slovenia's 1.7 million voters mirrors the growth of right-wing populism in central and eastern Europe following a large influx of migrants from the Mideast and Africa.

A government led by Jansa would shift Slovenia to the right and add an anti-immigrant voice to the European Union. Some 500,000 migrants passed through Slovenia, a country with a population of 2 million, during 2015.

Runner-up Sarec reiterated Sunday that a coalition with Jansa was not an option and said he hoped his party would lead a future coalition government.

Sarec is a former satirical comedian who gave up acting to enter politics and become mayor of the northwestern town of Kamnik. He also ran for president last year.

Cerar, the outgoing prime minister, said the results showed his party remains "an important player in the Slovenian political arena."

"We're going ahead together for a modern and free-thinking Slovenia, so it's better for everyone," he added.

Cerar has been credited with boosting the country's economy after a downturn. Sunday's election was held a few weeks earlier than scheduled due to his sudden resignation in March over a failed railway project.