Goryeo entered a period of military dictatorship similar to a shogunate in the late 12th century. During this period of "de facto" military rule, Goryeo monarchs continued to be viewed as Sons of Heaven and emperors, and Goryeo continued to be viewed as a "tianxia". The view of Goryeo as a "tianxia" inspired a spirit of resistance to the Mongols in the 13th century. Goryeo capitulated to the Mongols after 30 years of war and later became a semiautonomous "son-in-law state" () to the Yuan dynasty in 1270. Goryeo's imperial system ended with Wonjong of Goryeo. During this period of Mongol dominance, Goryeo monarchs were demoted to kings and temple names indicated loyalty to the Yuan dynasty. The "Songs of Emperors and Kings" and "Memorabilia of the Three Kingdoms" maintained the view of Goryeo as a "tianxia". However, the view of Goryeo as a "tianxia" gradually declined. Goryeo ended its son-in-law status in 1356: Gongmin of Goryeo recovered Ssangseong and declared autonomy. Meanwhile, Neo-Confucianism emerged as the dominant ideology; Confucianism profoundly influenced Korean thought, religion, socio-political systems, and ways of life for the first time in Korean history. The powerful influence of Neo-Confucianism in the twilight of the Goryeo dynasty led to a growing Sinocentric view of Korea as a "little China".