The Edo Castle, also known as Chiyoda Castle, is a flatland castle that was built in 1457 by Ōta Dōkan, who was a samurai warrior-poet. Flatland Castles were built in the middle of an open plain to make it possible to start a government and make communication between cities easier. They had no natural defenses, so the moats and walls of these castles were built bigger and stronger than other types of castles. The Edo Castle was the residence of the shōgun (the military dictator of Japan) and functioned as the military capital during the Edo period.
Pax Tokugawa was a prolonged period of peace as there was no serious military threat to the city. During this period, Edo devoted the majority of its recourses to rebuilding which was required due to a wake of consistent fires, earthquakes, and other devasting natural disasters. Even though during the Edo period Edo grew into one of the largest cities in the world, still it was not the capital of Japan. When the American commodore Matthew C. Perry arrived at Edo in 1853, he forced open the ports of Shimoda and Hakodate which led to a severe rise in inflation. This social unrest led to widespread rebellions that eventually caused the overthrow of the last shōgun in 1867 after which the Pax Tokugawa came to an end.
In 1869, the 17-year-old Emperor Meiji moved to Edo, and in accordance, the city was renamed Tokyo (meaning Eastern Capital). Tokyo was already the nation's political and cultural center, and the emperor's residence made it the imperial capital as well, with the former Edo Castle becoming the Imperial Palace. The city of Tokyo was officially established on May 1, 1889. In 1923 Tokyo suffered by the Great Kantō earthquake that left 140.000 people dead or missing.