Ask in Kathmandu how the valley began and you will hear of a lake. The Swayambhu Purana says the bodhisattva Manjushri cut through the hills with his sword to drain it, so pilgrims could reach a lotus of light; Krishna later reopened the outlet at Chobhar hill. The oldest hard evidence is a statue from Maligaon dated to 185 AD. Under the Kirata kings a village called Yambu stood in the northern half of today's old town, and the Newar name for the city, Yen, still comes from it.
The Licchavis arrived from Vaisali, in what is now Bihar, around 400 AD. Their king Gunakamadeva joined the northern and southern settlements into one city laid out in the shape of Manjushri's sword. It grew on the trade between India and Tibet. The Chinese traveller Xuanzang wrote about the palace of King Amshuverma in the 7th century. Newar artists took their skills across Asia: Araniko led a team to Tibet and China, and the princess Bhrikuti, married to the Tibetan king Songtsän Gampo, helped bring Buddhism to Tibet. One of the eight barracks that guarded the Licchavi city is still in use at Bhadrakali, opposite Singha Durbar.
The Malla era began badly. Raids came from the Khas and from Turkic Muslims, and an earthquake killed a third of the city, King Abhaya Malla among them. Most Licchavi architecture was lost. But by the later Malla centuries the valley held four rival walled cities, Kantipur (Kathmandu), Lalitpur, Bhaktapur and Kirtipur, and their kings competed in building. The Durbar squares, the stone waterspouts and the guthi trusts all date from that contest. When the Jesuit João Cabral came through in 1628, he called the capital "Cadmendu".
Prithvi Narayan Shah, king of the hill state of Gorkha from 1743, was beaten at Kirtipur on his first attempt. He came back and took Kathmandu in 1768, and by 1769 he held the whole valley. Kathmandu became the capital of his empire, which took the name Nepal. The nine-storey tower at Basantapur went up in these years, and so did the first Dharahara.
In 1846 Jung Bahadur Rana and his supporters killed most of the court's high-ranking officials in the Kot massacre, near Hanuman Dhoka, and his family took power. The Ranas sided with the British and built in a European style: Singha Durbar, the Garden of Dreams, the old Narayanhiti palace and New Road, the valley's first modern shopping street. They also founded Nepal's first college, school and hospital, though schooling stayed with the privileged. Their rule was harsh. After the political change of 1950 the country opened up to tourists, and by the 1960s hippies were carrying the name of Freak Street back to Europe and North America.
The new century was rough. In June 2001 King Birendra, Queen Aishwarya and others were shot dead in Narayanhiti Palace. Street protests in 2006 forced King Gyanendra to bring back parliament, and on 28 May 2008 an elected assembly voted 560 to 4 to end the monarchy. The palace is now a museum. Then came the earthquake of 25 April 2015. At magnitude 7.8, it killed 8,856 people across Nepal; in Kathmandu the Dharahara tower fell on 132 of them.
In September 2025 a ban on social media brought young people onto Kathmandu's streets. The protests turned to corruption and nepotism, government buildings burned, security forces used lethal force and the prime minister resigned. Sushila Karki, a former chief justice, became Nepal's first woman prime minister until elections in March 2026. Those were won by the Rastriya Swatantra Party, and its leader Balendra Shah, once the city's mayor, took office as prime minister on 27 March 2026.