Goryeo was invaded by the Mongols in seven major campaigns from the 1230s until the 1270s, but was never conquered. Exhausted after decades of fighting, Goryeo sent its crown prince to the Yuan capital to swear allegiance to the Mongols; Kublai Khan accepted, and married one of his daughters to the Korean crown prince, and the dynastic line of Goryeo continued to survive under the overlordship of the Mongol Yuan dynasty as a semi-autonomous vassal state and compulsory ally. The two nations became intertwined for 80 years as all subsequent Korean kings married Mongol princesses, and the last empress of the Yuan dynasty was a Korean princess.