Nijo Castle or Nijo-jo was built in 1603 as the residence of the first Tokugawa shogun of the Edo Period. After the Tokugawa Shogunate fell in 1867, Nijo Castle was used as an iimperial palace before being given to the city of Kyoto when it opened to the public. The entire castle grounds and the Honmaru are surrounded by stone walls and moats. Ninomaru Palace served as the residence of shoguns during visits to Kyoto. The palace survives in its original form, with separate buildings which are connected by corridors with “nightingale floors” that squeak when stepped upon as a security measure against intruders. Nijo Castle is surrounded by Ninomaru Garden, and altogether it is a UNESCO World Heritage Site.