LJUBLJANA, Slovenia — Slovenia's president said Monday he will offer a mandate to form the government to a right-wing opposition leader whose party won most votes at weekend parliamentary elections in the European Union nation.

Borut Pahor said that former prime minister Janez Jansa should be given a chance to gather a parliamentary majority after his anti-immigrant Slovenian Democratic Party won some 25 percent of the vote on Sunday.

Most other parties that have made it into the 90-member parliament have ruled out a coalition with Jansa because of his extremist position. They are more likely to form a centrist coalition.

"I am not obliged to award the mandate to the relative winner of the election, but I will do so because I strongly believe in democracy," Pahor told the Delo newspaper.

Observers in Slovenia are predicting long and tough post-election talks because a total of nine parties have entered the parliament, including the far-right National Party.

The anti-establishment List of Marjan Sarec trailed in second place with just over 12 percent, preliminary returns showed. The Social Democrats, the Modern Center Party of the outgoing prime minister, Miro Cerar, and the Left all received around 9 percent.

Slovenia was once part of 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 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 Middle East and Africa.