The Gyeongui Line is one of the oldest railway lines in Korea. When opened in 1906 it linked Seoul in what is now South Korea to P’yŏngyang and Sinŭiju in what is now North Korea. At Seoul, the line connected with the Gyeongbu Line to Busan, while at Sinŭiju, the line connected with the South Manchuria Railway, linking the Korean railway system to the rest of Asia and Europe.
After the division of Korea in 1945, trains stopped operating between the north and south halves of the country, meaning that southern trains probably terminated at Kaesŏng, which is now in North Korea but was at the time part of the US-administered southern zone. Northern trains would have terminated north of Kaesŏng.
After the end of the Korean War in 1953, southern trains were cut back to around Munsan (north of Seoul), with northern trains terminating at Kaesŏng. Around the same time, North Korea renamed the P’yŏngyang-Kaesŏng section of the line as the P’yŏngbu (P’yŏngyang + Busan) Line and the P’yŏngyang-Sinŭiju section as the P’yŏngŭi (P’yŏngyang + Sinŭiju) Line. The DPRK sector is now 100% electrifed, although the double track section spans only from Pyongyang to Sunan International Airport.
Since the summit between the two Koreas in 2000, an effort has slowly been underway to reconnect the Gyeongui Line. Southern passenger service has been extended to Dorasan on the edge of the Demilitarized Zone (DMZ) and tracks have been built across the DMZ itself. In October 2004, the Northern connection from the DMZ to Kaesŏng was finally completed. On May 17, 2007, the first train, carrying North and South Korean delegations, traveled from Munsan Station in the South to Kaesong in the North. A test run on the Donghae Bukbu Line also took place at the same time. According to South Korean representatives, the North has agreed in principle to regular passenger and freight service along the two train lines.