The Heian Palace was the original imperial palace of Heian-ky (present-day Kyoto), the capital of Japan, from 794 to 1227. In Japan, this palace is called Daidairi. The palace, which served as the imperial residence and the administrative centre of Japan for most of the Heian Period (from 794 to 1185), was located at the north-central location of the city in accordance with the Chinese models used for the design of the capital. The palace consisted of a large rectangular walled enclosure, which contained several ceremonial and administrative buildings including the government ministries. Inside this enclosure was the separately walled residential compound of the emperor or the Inner Palace. In addition to the emperor's living quarters, the Inner Palace contained the residences of the imperial consorts, as well as certain official and ceremonial buildings more closely linked to the person of the emperor.