A right-wing, anti-immigration opposition party won the most votes in Slovenia's parliamentary election on 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 (SDS) received around 25 percent of the vote.

The party in second place, the centre-Left The List of Marjan Šarec, trailed with over 12 percent. The Modern Center Party of Miro Cerar, the outgoing prime minister, was third with 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.

Slovenia was once part of the former Yugoslavia and is the homeland of Melania Trump, the US first lady. The country, which borders Austria, Croatia, Hungary, Italy and a slice of the Adriatic Sea, joined the European Union in 2004 and has used the euro as its official currency since 2007.