Legend dates Korea's first kingdom, Gojoseon, to 2333 BC. Later the Goguryeo kingdom ruled all of modern North Korea and more, and Pyongyang was its capital. The Joseon dynasty ruled from 1392 until 1910.
Japan ruled Korea as a colony until 1945. The Allies then split the peninsula at the 38th Parallel, with the Soviets in the north, and North Korea became its own state in 1948 under Kim Il-sung. In 1950 the North invaded the South. The war ended with an armistice in 1953, not a peace treaty, so the two Koreas remain officially at war.
Kim Il-sung built his own ideology, Juche, meaning self-reliance. When Soviet aid ended after 1991, the farming system collapsed in the mid-1990s and famine followed. Kim Il-sung died in 1994, Kim Jong-il in 2011, and Kim Jong-un has led since. A first nuclear test in October 2006 and missile tests brought UN sanctions.