Beijing does not belong to the Song Dynasty, the sixteen states of Yanyun, that is, all of today's Beijing and Tianjin, as well as northern Hebei and northern Shanxi. In 936 AD, Shi Jingtang, the founding emperor of the Later Jin Dynasty of China (the envoy of Hedong of the Later Tang Dynasty), rebelled against the Tang Dynasty and stood on his own feet and asked for help from Khitan. Khitan sent troops to support its construction
Details>