The failure to hold free elections throughout the Korean Peninsula in 1948 deepened the division between the two sides, and the North established a Communist government. The 38th Parallel increasingly became a political border between the two Koreas. Although reunification negotiations continued in the months preceding the war, tension intensified. Cross-border skirmishes and raids at the 38th Parallel persisted. The situation escalated into open warfare when North Korean forces invaded South Korea on 25 June 1950. It was the first significant armed conflict of the Cold War.
The United Nations, particularly the United States, came to the aid of the South Koreans in repelling the invasion. After early defeats by the North Korean military, when a rapid UN counter-offensive repelled the North Koreans past the 38th Parallel and almost to the Yalu River, the People's Republic of China (PRC) came to the aid of Communist North. A Chinese counter-offensive repelled the United Nations forces past the 38th Parallel. The Soviet Union materially aided North Korea and China. The threat of a nuclear war eventually ceased with an armistice that restored the border between the Koreas near the 38th Parallel and created the Korean Demilitarized Zone (DMZ), a 2.5-mile (4.0 km) wide buffer zone between the two Koreas.
During the war, both North and South Korea were sponsored by external powers, thus facilitating the war's metamorphosis from a civil war to a proxy war between powers involved in the larger Cold War. From a military science perspective, the Korean War combined strategies and tactics of World War I and World War II—swift infantry attacks followed by air bombing raids. The initial mobile campaign transitioned to trench warfare, lasting from July 1951 until the 1953 border stalemate and armistice.