Kathmandu's history is deeply intertwined with the mythology and early civilizations of the Kathmandu Valley. According to local legend, the valley was once a massive lake that was drained by the Buddhist patriarch Manjushri, who cleaved a gorge in the surrounding hills with his flaming sword. Archaeologically, the region has been inhabited for thousands of years, with the Kirat dynasty being the first documented rulers around the 7th century BC, followed by the Licchavi era (c. 400–750 AD), which ushered in a golden age of art and architecture.
The Malla period, beginning in the 12th century, heavily shaped the cultural and architectural identity of the city. The indigenous Newar people thrived during this time, building the elaborate pagoda-style temples, intricate wood carvings, and monumental public squares (Durbar Squares) that exist today. By the 15th century, the valley was divided into three rival but interconnected kingdoms: Kathmandu, Patan, and Bhaktapur.
In 1768, Prithvi Narayan Shah, the ruler of the Gorkha Kingdom, conquered the valley following the Battle of Kirtipur and established Kathmandu as the capital of his newly unified Kingdom of Nepal. The city remained under the rule of the Shah dynasty—and later the powerful Rana prime ministers who built grand, neoclassical palaces across the city—until the democratization movements of the mid-20th century. Modern history has seen Kathmandu transition from a royal capital to the seat of a federal democratic republic in 2008. The city also notably endured and is steadily recovering from the devastating April 2015 earthquake, which caused significant damage to its historic sites and infrastructure.
