LJUBLJANA, Slovenia (AP) — A former comedian whose party finished second in Slovenia's parliamentary election was appointed prime minister designate on Friday.

The political novice on the national stage, Marjan Sarec, who will propose a minority government consisting of five center-left parties, was backed in a 55-31 vote in Parliament.

The leftist parties have allied to sideline the top party in the June 3 parliamentary vote, the anti-immigrant, right-wing Slovenian Democratic Party led by former prime minister Janez Jansa.

Jansa, an ally of Hungary's anti-immigrant Prime Minister Viktor Orban, has failed to win support from other parliamentary groups for a right-leaning coalition in traditionally moderate Slovenia.

Analysts have predicted that Sarec's minority government would be unstable and likely won't last long.

"Irrespective of who voted for me today and who voted against, all can rest assured that I will be working for the benefit of everyone," Sarec said as he was sworn in.

Sarec, who has been mayor of the small Slovenian town of Kamnik since 2010, emerged as a significant political figure when he unexpectedly forced incumbent Borut Pahor to a second round in the October presidential election.

Before his career in politics, Sarec also worked as a comedy actor and journalist at the public broadcaster RTV Slovenia. He formed his party in 2014.

Sarec's appointment marks a rare case in Central Europe where a liberal politician has been elected to a senior post. Populists have lately been winning power in the region, ranging from Hungary to Poland and Italy.

Sarec, 40, is the youngest prime minister designate in Slovenia since its brief war for independence from Yugoslavia in 1991.