The first civilizations in Nepal, which flourished around the 6th century B.C., were confined to the fertile Kathmandu Valley. Nepali rulers' early patronage of Buddhism largely gave way to Hinduism, reflecting the increased influence of India, around the 12th century. Though the successive dynasties of the Gopalas, the Kiratis, and the Licchavis expanded their rule, it was not until the reign of the Malla kings from 1200–1769 that Nepal assumed the approximate dimensions of the modern state.
The kingdom of Nepal was unified in 1768 by King Prithvi Narayan Shah. Under him and his successors Nepal's borders expanded as far west as Kashmir and as far east as Sikkim (now part of India). A commercial treaty was signed with Britain in 1792 and again in 1816 after more than a year of hostilities with the British East India Company.
Between 1846 and 1951, the country was ruled by the Rana family, which had always held the office of prime minister. In 1951, however, the king took over all power and proclaimed a constitutional monarchy. Mahendra Bir Bikram Shah became king in 1955. After Mahendra died of a heart attack in 1972, Prince Birendra, at 26, succeeded him to the throne.
In 1990, a pro-democracy movement forced King Birendra to lift the ban on political parties. The first free election in three decades provided a victory for the liberal Nepali Congress Party in 1991, although the Communists gave a strong showing. The new government drafted and promulgated a new constitution in November 1990, which enshrined fundamental human rights and established Nepal as a parliamentary democracy under a constitutional monarch.
A small but growing Maoist guerrilla movement, seeking to overthrow the constitutional monarchy and install a Communist government, began operating in the countryside in 1996. The year 1996 marked the beginning of a period of instability and conflict. The Maoist insurgency began in three-four mid-western districts but soon spread to almost the entire country.
Following the May 1999 general elections, the Nepali Congress Party once again headed a majority government after winning 113 out of 205 seats. But the pattern of short-lived governments persisted. On June 1, 2001, Crown Prince Dipendra reportedly shot and killed his father King Birendra, his mother Queen Aishwarya, his brother, his sister, his father’s younger brother Prince Dhirendra, and several aunts before turning the gun on himself. After his death two days later, the late King’s surviving brother Gyanendra was proclaimed King
King Gyanendra fired the entire government in Feb. 2005 and assumed direct power citing a steady deterioration of conditions in the country. Many of the country's politicians were placed under house arrest, and severe restriction on civil liberties was placed. In Sept. 2005, the Maoist rebels declared a unilateral cease-fire, which ended in Jan. 2006. In April, massive pro-democracy protests organized by seven opposition parties and supported by the Maoists took place. They rejected King Gyanendra's offer to hand over executive power to a prime minister, saying he failed to address their main demands: the restoration of parliament and a referendum to redraft the constitution. Days later, as pressure mounted and the protests intensified, King Gyanendra agreed to reinstate parliament. The new parliament quickly moved to diminish the king's powers. In May, it voted unanimously to declare Nepal a secular nation and democratic republic country.