Slovenia’s parliament approved former comedian Marjan Sarec as the country’s new prime minister on Friday, after six parties joined forces to keep a populist, anti-immigration ally of Hungarian leader Victor Orban out of power.

Mr Sarec (40) is the youngest-ever premier of two-million strong Slovenia, and he now has 15 days to present his cabinet nominations to parliament, in what will be the first test of his broad coalition’s cohesion.

In elections in June, Mr Sarec’s eponymous centre-left party came second and took 13 of the 90 seats in parliament, 12 fewer than the victorious Slovenian Democratic Party (SDS) of Janez Jansa, a right-wing former premier and ally of Mr Orban.

Mr Jansa (59) tried to build a majority in parliament but was turned down but most other mainstream parties, which criticised his harshly anti-immigration rhetoric, agreed instead to forge an alliance with Mr Sarec.

The coalition led by the former actor, comic, journalist and local mayor will include five liberal parties and also enjoy the backing of the far-left Levica party, giving it a majority of 52 seats.

“I am aware of my faults and mistakes but I have courage and persistence . . . Irrespective of who voted for me today and who voted against, everyone can rest assured that I will be working for the benefit of everyone,” Mr Sarec said on Friday.

Private sectors

He said his government’s priorities would include improving healthcare and education, encouraging innovation to help modernise the economy, reforming the pension system and boosting co-operation between the state and private sectors.

Mr Sarec also played down warnings from the SDS that his coalition would be unwieldy and unworkable.

“A government is not stable because of the number of parties it includes, but because of the people who perform its functions,” he insisted.

“If you are a professional, doubts and possible disagreements are put aside and you work for the benefit of the state.”

Mr Jansa’s focus on immigration issues and his alliance with Mr Orban – who joined him on the campaign trail – ultimately backfired on the former premier.

He stepped down in 2013 during his second term in office due to allegations that he had solicited bribes as part of a major defence deal. Mr Jansa was convicted and sentenced to two years in jail, but the ruling was quashed in 2014 and the charges subsequently expired before a retrial could begin.

“A coalition of six parties, none of which won elections, including Levica, agreed to back a loser in the election as prime minister,” leading SDS member Danijel Krivec said ahead of Friday’s vote.

“The legitimacy of such a mandate to govern will be low . . . We can all justifiably ask ourselves how long this government will last.”