Kanmu first tried to move the capital to Nagaoka-kyō, but a series of disasters befell the city, prompting the emperor to relocate the capital a second time, to Heian