Gyeongui Line (1904–1945)
Following Japan's defeat in the Pacific War and the subsequent partition of Korea, the Gyeongui Line was divided at the 38th parallel between North and South Korea. On 25 August 1945, the Soviet Army began operating trains on the line north of Sariwon, whilst trains in the south terminated at Gaeseong. In 1946, the railways in both North and South were nationalised, creating the Korean National Railroad in the South and the Korean State Railway in the North. After the Korean War, the Gyeongui Line was split into three sections. In the South, the Seoul–Jangdan section became the KNR's Gyeongui Line, retaining the same name; in the North, the Bongdong–Pyeongyang section became the P'yŏngbu Line, whilst the Pyeongyang–Sinuiju section became the P'yŏngŭi Line.
Korea
In 1945, the Soviet Union and the United States agreed on the surrender of Japanese forces in Korea in the aftermath of World War II, leaving Korea partitioned along the 38th parallel. The North was under Soviet occupation and the South under U.S. occupation. These circumstances soon became the basis for the division of Korea by the two superpowers, exacerbated by their inability to agree on the terms of Korean independence. The Communist-inspired government in the North received backing from the Soviet Union in opposition to the pro-Western government in the South, leading to Korea's division into two political entities: North Korea (officially the Democratic People's Republic of Korea), and South Korea (officially the Republic of Korea). Tensions between the two resulted in the outbreak of the Korean War in 1950. With involvement by foreign troops, the war ended in a stalemate in 1953, but without a formalized peace treaty. This status contributes to the high tensions that continue to divide the peninsula. Both governments of the two Koreas claim to be the sole legitimate government of the region.