After China was reunified during the Sui dynasty, Jicheng, also known as Zhuojun, became the northern terminus of the Grand Canal. Under the Tang dynasty, Jicheng as Youzhou, served as a military frontier command center. During the An-Shi Rebellion and again amidst the turmoil of the late Tang, local military commanders founded their own short-lived Yan dynasties and called the city Yanjing, or the "Yan Capital." Also in the Tang dynasty, the city's name Jicheng was replaced by Youzhou or Yanjing. In 938, after the fall of the Tang, the Later Jin ceded the entire northern frontier to the Khitan Liao dynasty, which treated the city as Nanjing, or the "Southern Capital", one of four secondary capitals to complement its "Supreme Capital", Shangjing (modern Baarin Left Banner in Inner Mongolia). Some of the oldest surviving structures in Beijing date to the Liao period, including the Tianning Pagoda.