In 784CE Emperor Kammu wanted to move his capital away from Nara because he felt that the Nara Buddhist priests' power was affecting the government. Kammu found a site to move to called Nagaoka. Nagaoka was about 30 miles from Nara. This site was not succesful; rumors of corruption flew and families suffered illnesses.
In 794CE Emperor Kammu wanted to move his capital again, since he was not satisfied. And so he chose a little town by the Yodo River where it was easier to prevent attacks. This site became the new capital: Heian-kyo, the first true Japanese city.
Heian-kyo is designed into a checkerboard pattern. It is well built and blended in with the surrounding nature. It has mansions, gardens, shrines and temples. Today Heian-kyo is known as Kyoto.