Slovenian MPs approved centre-left candidate Marjan Sarec for the post of prime minister Friday, putting an end to weeks of political uncertainty after inconclusive elections in June.
Ex-comedian Sarec won the vote by 55 to 31 and will become Slovenia's youngest ever prime minister, at the age of 40.
He struck a pro-European note when addressing MPs during Friday's session, saying he was committed to seeing Slovenia "remain a part of the so-called core states" of the EU.
Sarec's LMS party came second in the June 3 election, but he plans to form a government with four other centre-left parties, which will be supported by the far-left Levica party in parliament.
The biggest single winner in the election was the anti-migrant centre-right Slovenian Democratic Party (SDS), headed by Janez Jansa. It won the most seats, 25, but failed to gather enough allies to form a ruling majority.
Sarec told MPs: "I am aware of my faults and mistakes but I have courage and persistence".
He described Slovenia's membership of the EU and NATO as "two great achievements" for the country, drawing a contrast with Levica, whose platform included leaving the US-led alliance.