Construction of the high-speed rail link between Malaysia and Singapore will be postponed for two years rather than cancelled, the two governments said on Wednesday.

After weeks of talks, negotiators managed to avoid scrapping the project altogether – the outcome Malaysian Prime Minister Mahathir Mohamad had previously said he preferred.

An agreement, signed in Mahathir’s office by Singapore’s Transport Minister Khaw Boon Wan and the Malaysian Economic Affairs Minister Azmin Ali, defers the start of construction work on the project to May 31, 2020, by which time Southeast Asia’s third largest economy hopes its poor fiscal position will have improved.

Previously the project had been slated to open to the public in 2026. It will now begin operating in 2031.

The move is an about-turn from the stance Mahathir took soon after his shock election victory in May.

The 93-year-old had said the project, approved by his predecessor Najib Razak, was unnecessary and would be cancelled.

The project and several other Chinese-backed infrastructure developments were reviewed after the May 9 poll in an effort to reduce national debt that, according to Mahathir, had snowballed under Najib.

Singapore reacted sharply to Mahathir’s pledges to scrap the project, with officials insisting the city state would seek reimbursement of S$250 million (US$181.8 million) for sunk costs if the project was cancelled.

Analysts welcomed the news.

The project had “undoubtedly significant value given the close links between Singapore and Malaysia, through labour, investment and people,” said Edmund Terence Gomez, a professor of political economy at the University of Malaya. “I am happy to see it has been deferred, not cancelled.”

In a press conference after Wednesday’s signing ceremony, Khaw said Singapore agreed to Malaysia’s request to postpone the project “in the spirit of bilateral cooperation”.

Said Khaw: “By the end of May 2020 we hope to see resumption. If not, the project will be deemed to be terminated and Malaysia will reimburse Singapore for the wasted cost we have incurred.”

His Malaysian counterpart Azmin emphasised his government intended to continue with the project after the two-year pause.

For now, Malaysia will pay Singapore S$15 million for “abortive costs” incurred by the delay.

What Mahathir really plans for China-backed projects (but can’t say in public)

Singapore has already sunk hundreds of millions of dollars into the project, after acquiring land for the portion of the rail link within its shores and setting up an agency to oversee the development.

Upon signing the original agreement in 2013, Najib and Singapore’s Prime Minister Lee Hsien Loong hailed their decision to build the line as a game changer in bilateral ties after decades of on-off tensions between the two neighbours following their acrimonious split in 1965.

The estimated 90-minute travel time of the rail journey compares with five hours by bus and one hour by plane.

Under the original timeline, which stipulated the line would be running by December 31, 2026, the main tender for the project was to have been awarded in the third quarter of next year.

That tender has now been called off.

China’s state-owned China Railway Engineering Cooperation as well as Korean, European and Japanese consortiums have expressed interest in the project.