In a bustling mall in Jakarta this past weekend, crowds gathered at a large display showcasing models of high-speed trains. They looked like fancy toys, but in fact were part of China’s effort to persuade Indonesia to partner with its companies—instead of Japan’s—to build the nation’s first high-speed rail line, which will link the capital Jakarta with Bandung, the nation’s third-largest city.

An emerging if struggling giant, Indonesia is expected to become Asia’s next trillion-dollar economy—and to spend heavily on infrastructure to get there. Now its high-speed train sector has become the prize in a tug-of-war between China and Japan, the region’s established giants. Indonesia will likely decide between their competing offers to build the Jakarta-Bandung line by the end of this month.

China’s offer comes in at $4 billion, with an annual interest rate of 2% and a 40-year tenor. But Japan will do the job for $3.3 billion and throw in a soft loan to cover 75% of the funding needed for the project, with an interest rate as low as 0.1%. Indonesia would have 40 years to pay off the amount, and wouldn’t have to begin paying installments until 11 years after the train starts operating.

China has warned Indonesia against technology lock-in with Japan, noting that its own systems are compatible with those of other major players in the sector, including Alstom, Siemens, and Bombardier. ”Some countries’ technology is not compatible with international standards, which may lead to a market monopoly,” said Xie Feng, China’s ambassador to Indonesia.

On the other hand, safety concerns hamper China’s bid. In 2011 a bullet-train crash near Wenzhou killed 40 and injured 200. The government determined design flaws and sloppy management were to blame.

Reuters/Aly Song The 2011 high-speed-train accident in Wenzhou, China, in 2011.

Japan has a stronger reputation for safety and a decades-long head start over China with this technology. But China, which launched its first high-speed train in 2008, has quickly surpassed Japan in terms of size: The total distance covered by the high-speed network across China is 16,000 kilometers, about six times that of Japan’s.

China is determined to use global train exports to help boost its slowing economy. In June it approved the merger of two giant state-owned train manufacturers, so they wouldn’t compete against each other in the cutthroat global race for orders. The resulting China Railway Construction Corporation is an industry behemoth second in size only to General Electric.

But Japan isn’t sitting still. As the Financial Times reported (paywall), this summer Tokyo announced plans to provide an extra $110 billion to finance high-tech infrastructure in Asia, including soft loans.

In the competition to secure big-ticket infrastructure projects and assert their influence in Southeast Asia, China and Japan each have their strengths. As the Financial Times noted, in its corner China has huge cash reserves, global trading clout, and vast industrial capacity, while Japan retains an edge in technology, financing, and foreign direct investment.

It remains to be seen how popular a high-speed line between Jakarta and Bandung would actually be. Traffic between the two cities, about 150 kilometers (93 miles) apart, reaches high volumes mainly on weekends, so it could take many years for a high-speed-rail project to pay off.

But Indonesia is considering more such routes, and whoever wins the Jakarta-Bandung line would be well-positioned to win additional contracts, too.