Wang Geon (founder of Goryeo), a general from a merchant family of Songak, today’s Kaesong, replaced Gungye (founder of Later Goguryeo) in 918 and named his kingdom Goryeo, after Goguryeo. Silla surrendered to him in 935, and he defeated Later Baekje in 936. To bind the country’s powerful families to his house, he married into many of them and had twenty-nine wives.
Goryeo introduced civil service examinations in 958 and was a strongly Buddhist state. Its potters made celadon, a stoneware with a soft green glaze that was admired across East Asia. When the Khitan Liao dynasty invaded in 993, the diplomat Seo Hui (diplomat who talked the Khitan back) talked their general into withdrawing and won land along the Yalu River, and in 1019 General Gang Gam-chan (general who beat the Khitan) destroyed a Khitan army at Gwiju.

In 1170 military officers, long treated as inferior to civil officials, seized power, and from 1196 the Choe family ruled behind the kings for some sixty years. When the Mongols invaded in 1231, the court moved to Ganghwa Island and held out there for nearly thirty years while the mainland was devastated. In these years Goryeo carved the Tripitaka Koreana, more than 80,000 woodblocks of Buddhist scripture, as a prayer for protection; they are still kept at Haeinsa temple.



From 1259 Goryeo made peace and became a son-in-law state of the Mongol Yuan dynasty: its crown princes married Mongol princesses, and Goryeo had to help build the fleets that invaded Japan in 1274 and 1281. As Yuan weakened, King Gongmin (king who threw off Mongol rule), who reigned from 1351 to 1374, won back independence. Japanese pirates raided the coasts, and the generals who fought them grew powerful. In 1388 General Yi Seong-gye (general who founded Joseon), ordered to attack Ming China, turned his army back at Wihwa Island, took control of the government, and in 1392 founded the Joseon dynasty.