Article published on the 2008-08-15 Latest update 2008-08-16 13:32 TU
Pushpa Kamal Dahal, known as Prachanda or "the fierce one", was elected by 464 votes to 113, beating his only rival Sher Bahadur Deuba of the Nepali Congress, who has been Prime Minister three times.
53-year-old Prachanda was born into the Brahmin caste of Hinduism but spent his childhood herding goats to help support his poor family.
He joined the Communist Party in 1980 and worked as a schoolteacher and then on US-funded projects. Inspired by the Chinese revolution and Peru's Shining Path movement, he became an advocate of guerrilla warfare and became the leader of the Maoists.
He launched their "People's War" in 1996 with attacks on police posts in the rural west of the country, leading to the movement taking over much of the countryside and then negotiating peace with the majority of the country's political parties when they were driven into opposition to the monarchy.
The end of the conflict, along with mass demonstrations in Kathmandu and other urban centres, led to the sacking of King Gyanendra and an election in which the Maoists shocked many pundits by becoming the largest party in the country.
They did not have enough MPs to rule alone, however, leading to prolonged political wrangling over the formation of a government and the selection of a prime minister.
Two major parties eventually reached a deal with the Maoists to back Prachanda.
His election was greeted by cheers, clapping and the banging of desks in the assembly, with many MPs rushing to congratulate the new leader of the new republic.
"He doesn't have a majority," said correpsondent CK Lal in Kathmandu. "He has won this seat on the strength of a very fragile coalition."
"His first challenge will be keeping this fragile coalition together, and he can look forward to very hard bargaining in the division of ministries," Lal added.