KUALA LUMPUR, Malaysia (AP) — Malaysia and Singapore say a planned high-speed railway that would cut travel time between their capitals to just 90 minutes will be suspended for two years instead of being axed.

Shortly after a stunning election victory in May, new Malaysian Prime Minister Mahathir Mohamad said the 350-kilometer (218-mile) rail project would be canceled because it was too costly.

But after weeks of negotiations, officials from the two countries signed an agreement Wednesday to defer construction of the rail link to May 31, 2020. The two governments said the railway is now slated to begin operations by 2031 instead of 2026.

Mahathir's about-turn will help Malaysia avoid paying hefty compensation and buy time to improve government finances.