Nepal's parliament has elected a former communist rebel leader as the country's new prime minister.

Parliament speaker Onsari Gharti Magar announced that Maoist party leader Pushpa Kamal Dahal received a majority of the votes of lawmakers on Wednesday.

It is Dahal's second time as prime minister of the Himalayan nation. His first tenure ended in 2009 when he resigned over differences with the president on the sacking of an army chief.

Dahal led a communist insurgency against the government for a decade until 2006, when the rebels signed a U.N.-monitored peace agreement. More than 17,000 people were killed during the insurgency.