According to the Yonhap news agency, the agreement has been reached at the high-level talks in the Panmunjom border village.
Earlier, North Korean Railways Ministry's Department of the External Affairs Deputy Director Kim Chang Sik noted that North Korea would develop the project on connecting the railways jointly with Russia and South Korea, noting that the countries of the Korean peninsula should become "owners" of the project.
The North and South Korean authorities have also agreed to hold general-level military talks as soon as possible, the joint statement released on Monday said.
"The South and the North decided to hold general-level military talks in the near future and discuss the issues of ending military tensions in the confrontation areas, including the demilitarized zone, in accordance with the military section of the Panmunjom Declaration, as well as the establishment and work of the joint military commission," the joint statement read.
Earlier in the day, the two countries held high-level talks in the Panmunjom border village.
The two Koreas saw a significant thaw in bilateral relations following the meetings between the two leaders, as well as meetings of the two with US President Donald Trump.