The Korean Empire intended to build the Gyeongui Line with its own resources at the end of the 19th century, but the project stalled due to lack of funds. Imperial Japan, which gained a concession to build the Gyeongbu Line from Busan to Seoul, also sought to gain control of the Gyeongui Line project as its continuation further north, recognising the trunk route as a means to keep Korea under its influence. The line was also advanced for military considerations in expectation of a confrontation with Russia, which came in 1904 as the Russo-Japanese War. At the start of the war, Japan ignored Korea's declaration of neutrality and transported troops to Incheon, and forced the Korean government to sign an agreement that gave Japan's military control of railway projects if deemed necessary for military operations. Japan's military began to build the Gyeongui Line, while troop bases were established in connection with the railway, the biggest of them next to the terminus of the line, Yongsan Station in Seoul.