In May 2002, the House of Representatives was dissolved by King Gyanendra on advice of the then prime minister, Sher Bahadur Deuba, in order to hold new elections. Elections could not take place due to the ongoing civil war, which eventually led King Gyanendra to stage a royal coup. Following the democracy movement of 2006, the King reinstated the earlier legislature. On 15 January 2007, the House of Representatives was transformed into an Interim legislature. This consisted of members appointed under an agreement between the Seven Party Alliance and the Communist Party of Nepal (Maoist).