Rome (CNN) A law professor who has never held political office was sworn in as Italy's new Prime Minister on Friday afternoon, bringing to power a populist new government whose senior figures whipped up anti-immigrant and euroskeptic sentiments in their path to office.

Giuseppe Conte took an oath of loyalty to the Italian constitution in a gilded room in the Quirinal, Italy's presidential palace in Rome, ending three months of political turmoil.

But while Conte will nominally hold the most powerful office in Italy, the driving forces in his administration will be the leaders of the two political parties that gained the most votes in an inconclusive election in March: the right-wing League party and the anti-establishment Five Star Movement.

After initially vetoing the choice of finance minister, Italian President Sergio Mattarella on Thursday evening approved a reshuffled lineup . Conte and his Cabinet ministers were sworn in on Friday, with the apparently unsuitable minister -- who had expressed enthusiasm for extricating Italy from the euro -- shifted to the less high-profile role of Europe affairs minister.

Conte and his new government will also face a confidence vote in parliament next week. Speaking at the Quirinal on Thursday evening, Conte pledged his new government would "work intensely to realize the political goals of our agreement" and "work with determination to improve the lives of all Italians."

Prime Minister Giuseppe Conte (R) shakes hands with Italy's President Sergio Mattarella during the swearing in ceremony Friday.

Read More