Indonesia and Japan signed a deal Tuesday on an outline of a medium-speed train project linking the Southeast Asian country's capital of Jakarta and its second-largest city, Surabaya.

After two years of negotiations, the two countries agreed to use a narrow gauge on the railway track, instead of standard gauge, to better adapt to land characteristics in dense and multi-networked areas on the island of Java.

Under the agreement, the project will be split into two phases, with the first between Jakarta and the Central Java provincial capital of Semarang and the second between Semarang and Surabaya, the capital of East Java province, covering distances of 436 km and 284 km, respectively.

Both Indonesian and Japanese officials have said the initial investment value of the project was estimated at 60 trillion rupiah (¥458 billion).

In an interview with Kyodo News a couple months ago, President Joko Widodo said he expected construction of the railway to start next year.

Indonesia's Agency for the Assessment and Application of Technology has predicted that 12.4 percent of airline passengers between the two cities, which totaled around 8 million last year, will shift to the trains.

Last year, a "political decision" was made by the government to have only Indonesian and Japanese companies participate in the tender to build the railway network.

Indonesia has been leaning toward choosing Japan for the project in an apparent effort to ease Tokyo's disappointment at losing to China in 2015 in bidding to construct a high-speed railway between Jakarta and Bandung.