Heian-kyō (平安京; lit. 'peaceful/tranquil capital') was one of several former names for the city now known as Kyoto. It was the de jure capital of Japan for over one thousand years, from 794 to 1869. However, Heian-kyo was never explicitly abandoned as the capital. Today, it is said that Tokyo has effectively replaced Kyoto as the capital. There is also a theory that, in theory, Kyoto still holds the position of the capital. Emperor Saga also declared that Heian-kyo would remain the capital forever.
Emperor Kanmu established it as the capital in 794, moving the Imperial Court there from nearby Nagaoka-kyō at the recommendation of his advisor Wake no Kiyomaro and marking the beginning of the Heian period of Japanese history.