Several ceasefires had occurred over the course of the Nepalese civil war. Most recently, on 26 April 2006, Prachanda announced a ceasefire with a stated duration of 90 days. The move followed weeks of massive protests—the April 2006 Nepalese general strike— in Kathmandu and elsewhere that had forced King Gyanendra to give up the personal dictatorship he had established on 1 February 2005, and restore the parliament that had been dissolved in May 2002.
Maoist leader Krishna Bahadur Mahara claimed that a secret agreement between the Seven-party Alliance and the king was reached on 24 April, in which they would ensure the king would retain monarchy in some form in the future. On 6 June 2006, Prime Minister Girija Prasad Koirala went to India for a four-day visit seeking support from India for Nepal's recent political changes. The Maoist chairman insisted they not ask for any economic assistance, without resolving the political disputes within the country, and demanded that the Maoist prisoners be released soon, who were languishing in Indian jails.
Prachanda met for talks with Prime Minister Girija Prasad Koirala on 16 June 2006, which was thought to be his first visit to the capital Kathmandu in more than a decade. This meeting resulted in the Comprehensive Peace Accord to dissolve parliament, incorporate the CPN(M) into a new interim government, draft a new constitution, and disband the CPN(M)'s "people's governments" operating in rural Nepal. The two sides also agreed to disarm at a later date, under international supervision. On 18 September 2007, the CPN(M) left the coalition government ahead of the Constituent Assembly election, demanding the declaration of a republic by parliament, and a system of proportional representation in the election. The CPN(M) rejoined the government on 30 December 2007 after an agreement to abolish the monarchy following the election, and to have a system of partial proportional representation in the election.