After the transfer of the capital, the former Nagaoka-kyō area became the domain of Sugawara no Michizane, and the Nagaoka Tenman-gu Shinto shrine was constructed after his exile in 901.
Upon relocation of the capital, the area formerly known as Nagaoka-kyō came under Sugawara no Michizane's authority, and a temple shrine honoring Tenman-gu was constructed following his exile in 901.