Goryeo had been a semi-autonomous vassal state under the overlordship of the Mongol Yuan dynasty since the Mongol invasions of Korea in the 13th century. Starting with King Chungnyeol, prospective rulers of Korea married Mongolian princesses and were customarily sent to the Yuan Court, in effect, as hostages. As per this custom, King Gongmin spent many years in the Yuan court, being sent there in 1341, before ascending the Korean throne. He married a Mongolian princess who became Queen Noguk. The Yuan dynasty began to crumble during the mid-14th century, and was eventually conquered and replaced by the Ming dynasty in 1368.