Jhalnath Khanal was sworn in by President Ram Baran Yadav at a ceremony in Katmandu. He was chosen by parliament on Thursday, seven months and 17 attempts after the last government resigned amid sometimes violent protests.
Discussions on a new Cabinet between leaders of Khanal's Communist Party of Nepal (United Marxist Leninist) and its main coalition partner, the Communist Party of Nepal (Maoist), have not yielded an agreement.
Yogesh Bhattarai, a close Khanal aide, said the negotiations were continuing.
Khanal, 60, is a veteran politician who was involved in pro-democracy protests against the monarchy in 1990 and again in 2006. This is his first time to serve as prime minister.
The last government resigned in June 2010 because of pressure from the Maoists, a former rebel group which joined mainstream politics and is now the largest party in parliament. But no party holds a majority, and no candidate had been able to win the support of more than half the lawmakers during the 16 previous votes, resulting in a government deadlock.
Khanal's party, the third largest in parliament, received the support of the Maoists in the 17th attempt on Thursday.
He now faces the challenge of restoring the peace process that ended the Maoist insurgency. His government will have to decide the fate of thousands of former Maoist fighters who are still in camps and oversee the writing of a new constitution.