The history of Tokyo, Japan's capital prefecture and largest city, starts with archeological remains in the area dating back around 5,000 years. Tokyo's oldest temple is possibly Sensō-ji in Asakusa, founded in 628. The city's original name, Edo, first appears in the 12th century. From 1457 to 1640, Edo Castle was constructed, and was the city's center.
Tokugawa Ieyasu, after finishing his conquest of Honshu in 1600, chose Edo as a new capital. Japan's monarchy at Kyoto became a symbolic entity, as the country's real power was given to Edo's Tokugawa Shogunate. By the 1650s, it became Japan's largest city, and by 1720, it was the world's largest. The Great Fire of Meireki in 1657 killed around 108,000 people.
After the opening of Japan in 1854, there was conflict over Japan's governance. This led to the Boshin War and Meiji Restoration: the shogunate was dissolved, and the imperial monarchy's powers were restored at Edo, renamed Tokyo. In the 20th century, city was destroyed by the Great Kanto earthquake and the Allied bombings during World War II. Over 100,000 people died in the U.S.' Operation Meetinghouse.
After Japan surrendered to America in 1945, America occupied the city until 1952. The post-war Japanese economic miracle and the 1964 Summer Olympics allowed the city to rebuild and grow. The city's transportation needs were met by the interlocking of the Tokyo Metro, Toei Subway, and Shinkansen. In 1990, the country entered a period of economic stagnation called the Lost Decades. The COVID-19 pandemic scaled back the 2020 Summer Olympics. Defined by United Nations estimates, Tokyo was the world's largest city in 2018 with 37,468,000 people. Judged by city proper, it was the 12th largest, with 13,515,271.