Dahal was the leader of the Communist Party of Nepal (Maoist) during the country's civil war and subsequent peace process and the 1st Nepalese constituent assembly. In the 2008 elections, CPN(M) emerged as the largest party, and Dahal became Prime Minister in August of that year. He resigned from the post on 4 May 2009 after his attempt to sack the then army chief, General Rookmangud Katawal, was opposed by then President Ram Baran Yadav.