For a long time, the royal family of Nepal basically ran the country - from about 1768 to the present, evolving into a strong monarchy with a parliament..
In 1996, the Communist Party of Nepal (Maoist) began trying to replace the royal parliamentary system with a people's socialist republic by violent means. This led to the long Nepal Civil War and more than 12,000 deaths.
On June 1, 2001, there was a massacre in the royal palace. King Birendra, Queen Aiswarya, Crown Prince Dipendra and seven other members of the royal family were killed. Dipendra was accused of killing his family and killing himself afterwards, suppoedly because his parents refused to accept his choice of a wife. There are doubts among the Nepalese people about who was responsible, though.
Following the bloodbath, Birendra's brother Gyanendra took the throne. On February 1, 2005, Gyanendra dismissed the entire government and assumed full executive powers to quash the violent Maoist movement, but this initiative was unsuccessful because the Maoists were firmly entrenched in large expanses of countryside, yet could not dislodge the military from many towns and the largest cities.
In September 2005, the Maoists declared a three-month unilateral ceasefire in order to negotiate. In response to the 2006 democracy movement King Gyanendra agreed to relinquish sovereign power to the people. On April 24, 2006 the dissolved House of Representatives was reinstated.
Using its newly acquired sovereign authority, on May 18, 2006 the House of Representatives unanimously voted to curtail the power of the king and declared Nepal a secular state, ending its time-honoured official status as a Hindu Kingdom. On December 28, 2007, a bill was passed in parliament to amend Article 159 of the constitution — replacing "Provisions regarding the King" by "Provisions of the Head of the State" - declaring Nepal a federal republic, and thereby abolishing the monarchy. The bill came into force on May 28, 2008, as the constituent assembly overwhelmingly voted to abolish royal rule and establish Nepal as a republic.
The Communist Party of Nepal (Maoist) won the largest number of seats in the Constituent Assembly election held on April 10, 2008 and formed a coalition government which included most of the parties in the CA. Although acts of violence occurred during the pre-electoral period, election observers noted that the elections themselves were markedly peaceful and "well-carried out."
The newly elected Assembly met in Kathmandu on May 28, 2008, and, after a polling of 564 constituent Assembly members, 560 voted to form a new Government, with the monarchist Rastriya Prajatantra Party, which had four members in the assembly, registering a dissent note. At that point, it was declared that Nepal had become a secular and inclusive democratic republic.
On June 26, 2008, Prime Minister Girija Prasad Koirala tendered his resignation to the Nepalese Constituent Assembly, which is also functioning as the Nepalese Parliament; however, a new Prime Minister has yet to be elected by the Nepalese Constituent Assembly.
On July 19, 2008, the first round of voting for the election of the country's president and vice president took place in the Constituent Assembly. Parmanand Jha became the first vice president of Nepal. However, the two presidential frontrunners, Dr. Ram Baran Yadav of Nepali Congress and the Maoist-backed candidate Ram Raja Prasad Singh, both failed to gain the minimum 298 votes needed to be elected, with Yadav receiving 283 votes and Singh receiving 270. 578 out of 594 CA members registered in the voter list had cast their votes, of which 24 were invalid.
On July 21, 2008, the second round of voting was held. Yadav received 308 of the 590 votes cast, securing his election as president.
On August 15, 2008, Maoist leader Prachanda (Pushpa Kamal Dahal) was elected Prime Minister of Nepal, the first since the country's transition from a monarchy to a republic. On May 4, 2009, Mr. Pushpa Kamal Dahal resigned over on-going conflicts over sacking of the Army chief.
In May 2009, the Maoist-led government was toppled and another coalition government with all major political parties barring the Maoists was formed. Madhav Kumar Nepal of the Communist Party of Nepal (Unified Marxist-Leninist) was made the Prime Minister of the coalition government.