Later Three Kingdoms

The Later Three Kingdoms period (889–936 AD) of ancient Korea saw a partial revival of the old three kingdoms which had dominated the peninsula from the 1st century BC to the 7th century. After the Unified Silla kingdom had ruled Korea alone from 668, it slowly began to decline and the power vacuum this created led to several rebellious states rising up and taking on the old historical names of Korea's ancient kingdoms. A messy period of alliances and in-fighting followed, but one state would once again establish a dominant position—Goryeo, itself named in homage to the earlier northern Goguryeo kingdom—and form a unified Korean state and a dynasty which would last almost 500 years.

History
The Unified Silla Kingdom (668–935) had held sway over the Korean peninsula for three centuries, but by the 10th century the state had been in steady decline. During this time, local aristocrats develped greater independence, until they functionally became independent warlords. Peasants were regularly robbed.

Kyŏn Hwŏn and Kung Ye
Kyŏn Hwŏn (867-936), a peasant leader and Silla army officer, took advantage of the political unrest in 892 and made himself military governor of the city of Muju. In 900, Kyŏn joined forces with the bandit Yang Kil, formed a revival of the old Baekje (Paekche) kingdom in the south-west portion of the peninsula. He chose what is now Jeonju as his capital.

In 901, an aristocratic Buddhist monk leader, Kung Ye, declared a new Goguryeo state in the north. After serving as one of Yang Kil's commanders, he betrayed Yang and killed him in 901. His capital was first at Songak (Gaesong) and then Cheorwon. He also twice changed the name of his kingdom, to Majin in 904 and Taebong in 911, although the state is best remembered by the name Later Goguryeo.

Kung Ye was seen as an eccentric tyrant by both farmers and the upper classes. He reportedly believed himself to be the Maitreya Buddha, claimed he had mind reading powers, and reportedly had 200 monks chanting mantras following him during his excursions. In 918, a coup was launched against him. Kung was replaced by Wang Kŏn, who restored the name Goryeo to the kingdom.

There then followed a protracted power struggle for control of the peninsula. Kyŏn Hwŏn attacked Gyeongju, the Silla capital, in 927.

Wang Geon's unification of Korea
Later Baekje attacked the Silla kingdom in 920 and 924. Silla responded by calling on Later Goguryeo for assistance. When Baekje attacked and sacked the Silla capital of Gyeongju in 927, the Silla king Gyeongae of Silla (r. 924-927) was forced to commit suicide and a puppet ruler, Kim Pu installed in his place. Wang responded by attacking the Later Baekje capital. Kyŏn Hwŏn then lost a battle at Geochang to a force led by Wang. Back at the Baekje capital, Kyŏn Hwŏn faced a rebellion led by his son Kyŏn Sin-gŏm, who, displeased that his father had favoured his younger brother as next in line for the throne, imprisoned Kyŏn Hwŏn.

Wang was now in possession of most of Silla's territory. His position as de facto ruler of Korea was recognised by the Tang dynasty of China in 932. In 934, after Wang's overwhelming victory over Baekje at Unju (Hongseong), refugees from the northern Manchurian state of Balhae (Parhae) felt the situation stable enough to return to Korea.

Gyeongsun of Silla surrendered and named Wang as his successor in 935. In that same year, Kyŏn, who had escaped to Later Goguryeo territory, appealed to his old enemy Wang for help to remove Kyŏn Sin-gŏm. Kyŏn led a Goguryeo army to Baekje, and the resulting civil war and death of both Kyŏn Sin-gŏm and Kyŏn Hwŏn in 936, greatly weakened Baekje and allowed Wang to finally unify the country once again under the name of Goryeo, origin of today's name for Korea. Wang, posthumously given the title of Taejo of Goryeo or 'Great Founder,' established a dynasty which would rule Korea for the next five centuries.