section_path: History/Unified dynasties
section_name: Unified dynasties
paragraph_text: Unified dynasties
  
  In 936, the Later Three Kingdoms were united by Wang Geon, a descendant of Goguryeo nobility, who established Goryeo as the successor state of Goguryeo. Balhae had fallen to the Khitan Empire in 926, and a decade later the last crown prince of Balhae fled south to Goryeo, where he was warmly welcomed and included in the ruling family by Wang Geon, thus unifying the two successor nations of Goguryeo. Like Silla, Goryeo was a highly cultural state, and invented the metal movable type printing press. After defeating the Khitan Empire, which was the most powerful empire of its time, in the Goryeo–Khitan War, Goryeo experienced a golden age that lasted a century, during which the Tripitaka Koreana was completed and significant developments in printing and publishing occurred. This promoted education and the dispersion of knowledge on philosophy, literature, religion, and science. By 1100, there were 12 universities that produced notable scholars.
  
  However, the Mongol invasions in the 13th century greatly weakened the kingdom. Goryeo was never conquered by the Mongols, but exhausted after three decades of fighting, the Korean court sent its crown prince to the Yuan capital to swear allegiance to Kublai Khan, who accepted and married one of his daughters to the Korean crown prince. Henceforth, Goryeo continued to rule Korea, though as a tributary ally to the Mongols for the next 86 years. During this period, the two nations became intertwined as all subsequent Korean kings married Mongol princesses, and the last empress of the Yuan dynasty was a Korean princess. In the mid-14th century, Goryeo drove out the Mongols to regain its northern territories, briefly conquered Liaoyang, and defeated invasions by the Red Turbans. However, in 1392, General Yi Seong-gye, who had been ordered to attack China, turned his army around and staged a coup.
  
  Yi Seong-gye declared the new name of Korea as "Joseon" in reference to Gojoseon, and moved the capital to Hanseong (one of the old names of Seoul). The first 200 years of the Joseon dynasty were marked by peace and saw great advancements in science and education, as well as the creation of Hangul by Sejong the Great to promote literacy among the common people. The prevailing ideology of the time was Neo-Confucianism, which was epitomized by the seonbi class: nobles who passed up positions of wealth and power to lead lives of study and integrity. Between 1592 and 1598, Japan under Toyotomi Hideyoshi launched invasions of Korea, but the advance was halted by Korean forces (most notably the Joseon Navy led by Admiral Yi Sun-sin and his renowned " turtle ship ") with assistance from righteous army militias formed by Korean civilians, and Ming dynasty Chinese troops. Through a series of successful battles of attrition, the Japanese forces were eventually forced to withdraw, and relations between all parties became normalized. However, the Manchus took advantage of Joseon's war-weakened state and invaded in 1627 and 1637 and then went on to conquer the destabilized Ming dynasty. After normalizing relations with the new Qing dynasty, Joseon experienced a nearly 200-year period of peace. Kings Yeongjo and Jeongjo particularly led a new renaissance of the Joseon dynasty during the 18th century.
  
  In the 19th century, Joseon began experiencing economic difficulties and widespread uprisings, including the Donghak Peasant Revolution. The royal in-law families had gained control of the government, leading to mass corruption and weakening of the state. In addition, the strict isolationism of the Joseon government that earned it "the hermit kingdom " became increasing ineffective due to increasing encroachment from powers such as Japan, Russia, and the United States. This is exemplified by the Joseon–United States Treaty of 1882, in which it was compelled to open its borders.