Though Pushpa Kamal Dahal -- better known as Prachanda -- was the only contender for the top post, he had to go through the voting as the Constitution requires the Prime Minister to prove support of the majority lawmakers in the House.
The 61-year-old CPN-Maoist Centre chief was elected Prime Minister with 363 votes in favour and 210 against him. Out of a total 595 members, 22 did not vote.
This is the second time Prachanda has become Prime Minister after his brief stint with premiership came to an end in 2009.
He was prime minister from 2008 to 2009 before a disagreement with the military over his attempt to sack the army chief brought his period in office to an early end.
Prachanda won today's vote after Nepali Congress and CPN Maoist Centre signed a three-point agreement withthe Madhesi Front to secure support from the Madhesi parties for their bid to form a new government led by him.