Kyōto
The Ashikaga shoguns ruled from Kyōto, and their quarrels nearly destroyed it. The Ōnin War of 1467–1477 was fought mainly in the city's own streets, and it left Kyōto in ruins, worst of all the northern district of Kamigyō around the shogun's palace at Muromachi. With the shogunate too weak to protect them, the townspeople of Kamigyō and the merchant quarter of Shimogyō formed self-governing neighbourhood leagues and walled in their streets, and in 1500 they revived the Gion festival after a gap of thirty-three years.
Order returned with the unifiers. Oda Nobunaga marched into the city in 1568, and Toyotomi Hideyoshi then remade it, abolishing toll barriers and guild monopolies, building his Jūraku palace and in 1591 raising the Odoi, an earthen rampart around the whole city. The Tokugawa governed Japan from Edo, but Kyōto remained one of the three great cities of the realm, home to the emperor and watched over by a shogunal deputy.