Fujiwara-kyō (藤原京) was the Imperial capital of Japan for sixteen years, between 694 and 710. It was located in Yamato Province (present-day Kashihara in Nara Prefecture), having been moved from nearby Asuka, and remained the capital until its relocation to Heijō-kyō present-day Nara. It was the first in Japanese history to have been a planned city based on a square grid pattern modeled after the Chang'an, the capital of Tang dynasty China.