KATHMANDU , Nepal ( CNN ) -- An unopposed former Communist leader was elected Nepal 's new prime minister Saturday , ending nearly three weeks of political uncertainty . Madhav Kumar Nepal waves at his supporters at the country 's parliament in Kathmandu . Madhav Kumar Nepal of the Communist Party of Nepal ( Unified Marxist-Leninist ) was the only person to serve as a candidate for the post after he received backing from more than 20 of the 25 parties in parliament . Nepal , 56 , is a former general secretary of the Communist Party , but had resigned after the party made a poor showing last year against another Communist movement . In that vote , the Communist Party of Nepal ( Maoist ) became the largest party , with 38 percent of the seats in the 601-member constituent assembly which also functions as parliament . Nepal had been general secretary since 1993 and served as the country 's deputy prime minister for nine months in 1995 . Pushpa Kamal Dahal , the Maoist chairman , resigned as prime minister May 4 after the president overturned the Cabinet 's decision to sack the army chief . Nepal became a republic last year . The new government has two important tasks before it : the writing of a new constitution within a year , and integration of 19,600 Maoist combatants into the security forces . Without the support of the former Maoist rebels , these tasks can not be achieved . The Maoists fought a 10-year insurgency aimed at abolishing the monarchy .
Madhav Kumar Nepal of the Communist Party of Nepal was only candidate . Nepal , 56 , is a former general secretary of the Communist Party . Pushpa Kamal Dahal , the Maoist chairman , resigned as prime minister May 4 . Followed president 's decision to overturn Cabinet 's sacking of army chief .