KATHMANDU (Reuters) - Nepals parliament elected a moderate communist leader as prime minister Thursday, ending a political stalemate which the United Nations had warned could risk a peace process in the republic. Jhalnath Khanal, chief of the Communist UML party, was elected prime minister with the support of Maoist former rebels, who dominate parliament, following seven months without an effective government in the Himalayan nation. The election raises hopes for a revival of a stalled peace process begun in 2006 after the end of a decade-long civil war. It could quicken the drafting of a new constitution and a decision on the future of the former combatants. These goals cannot be achieved alone without the support of all political parties, Khanal told parliament. We can take the country forward through the transition to peace and prosperity only on the basis of a national consensus. Nepal was plunged into crisis in June when Madhav Kumar Nepal quit as prime minister under pressure from the Maoists after sparring over the control of the army and the integration of the former combatants into regular forces. A 2006 peace deal ended the war between the Maoists and the then royal government, in which more than 16,000 people were killed. The Maoists won the most seats in parliamentary elections in 2008 and the 239-year old monarchy was later abolished.