Malaysian Prime Minister Mahathir Mohamad speaks during a news conference at the Great Hall of the People in Beijing on Aug. 20, 2018. (How Hwee Young/AFP/Getty Images)

Malaysian Prime Minister Mahathir Mohamad announced Tuesday he will shelve two major infrastructure projects by Chinese companies for being too expensive for his debt-ridden country.

The rejection of the projects, part of China’s signature Belt and Road Initiative (BRI), was in stark contrast to the prime minister’s cozy dinner with Chinese President Xi Jinping the day before, when they said they were “optimistic” about their shared future and promised to “enhance mutual political trust.”

“I believe China itself does not want to see Malaysia become a bankrupt country,” he said. “China understands our problem and agreed.”  

One of the projects, dubbed the East Coast Rail Link, would have connected the South China Sea with strategic shipping routes in Malaysia’s west, providing an essential trade link. The other was a natural gas pipeline in Sabah, a Malaysian state on the island of Borneo. 

Mahathir said several key details, including compensation, still have to be worked out.

At a Tuesday news conference, a Chinese spokesman said Xi was “deeply satisfied” with the visit. “China has always carried out economic and trade and investment cooperation with other countries on the principle of mutual benefit,” he said.

“Of course, cooperation between any two countries will inevitably lead to some problems, and different views may emerge at different times,” the official said, adding that the countries would continue to work together.

Mahathir’s decision is a big blow for China, said Marina Rudyak, who studies Chinese foreign aid at Heidelberg University. “Xi Jinping frames BRI as China’s contribution in a ‘new era’ where China is a responsible global player,” she wrote in an email. “This means the canceled projects signify a failure of China’s economic diplomacy.” 

With its Belt and Road Initiative, China thought it could outperform Western projects “while at the same time helping Chinese companies to internationalize,” Rudyak said. “Turns out, there is a reason for all those bulky international standards China had frequently portrayed as obsolete and obstructing development.”

The World Bank, which funds infrastructure projects in many developing countries, has said the Belt and Road Initiative comes with potential benefits and risks. In a blog post this spring, a senior World Bank economist said successful BRI projects could improve infrastructure and commerce in countries that have had difficulty integrating into the world economy.

But the economist, Michele Ruta, added that for some countries, “the financing required for BRI projects may expand debt to unsustainable levels.” Big infrastructure projects can also carry “environmental, social, and corruption risks,” he said, especially “in countries involved in the BRI, which tend to have relatively weak governance.”

Much of Asia’s trade passes through Malaysia’s waters, between the Indian and Pacific oceans. The country also boasts one of the most advanced economies in Southeast Asia, giving partners a stable foothold in the region.

At one time, the country was happy to partner with China. Mahathir’s predecessor, Najib Razak, accepted billions of dollars in loans from China, giving Beijing opportunities to expand its presence in the small country. 

In the past few years, a major Chinese power company began funding a giant deepwater port, part of a maritime trade route designed to reach from Shanghai to Rotterdam. A Foshan-based developer is installing artificial islands off the country’s coast that may someday house nearly 1 million people, including Chinese citizens.  

Now, though, that is changing. 

In May, Najib was voted out of office. Among other things, the corruption-plagued leader was accused of signing bad deals with China to bail out his graft-plagued state investment funds. Malaysia is struggling under $250 billion in debt. Mahathir said his decision to freeze two big projects will help his country save money. 

Last week, the Malaysian leader said he had some concerns with how the projects were carried out. Bidding was closed, and Chinese projects often import Chinese laborers rather than hiring locals. 

In an interview with the New York Times, Mahathir said he had evidence that the East Coast Rail Link could have been built by a local company for about half of the $13.4 billion sum his predecessor agreed to pay state-owned China Communications Construction. (Malaysia’s finance minister predicted that the railway would end up costing nearly $20 billion.)

He also said that Malaysia had already paid $2 billion toward the $2.5 billion pipeline project, carried out by a subsidiary of the China National Petroleum Corporation, but nothing had yet been built.    

“We do not want a situation where there is a new version of colonialism happening because poor countries are unable to compete with rich countries,” Mahathir said at a Monday news conference in the Great Hall of the People in Beijing.

China’s Belt and Road Initiative has made the country popular throughout Africa and Asia. China has spent $500 billion to help redevelop key infrastructure, creating new shipping and rail lines that will speed trade. But lately, some of the country’s recipients have said the investment comes with too many strings, including closed bidding processes and unfavorable leases and deals that give China prime access to many of these projects once completed.

Several countries have begun trying to renegotiate their deals with the Chinese government and key countries, says Agatha Kratz, an associate director of the Rhodium Group who studies China’s infrastructure investments. 

And some countries are “realizing that accepting too many Chinese (most often debt-financed) projects is weighing on their fiscal strength, and can endanger their broader economic health,” she wrote in an email. For example, China invested heavily in struggling Sri Lanka after its civil war ended in 2009. But that investment came in the form of loans for roads, ports and conference centers. 

Today, Sri Lanka spends about 80 percent of its government revenue paying down what it calls “unprecedented” debt — often for near-empty highways or glossy international airports that host just one flight a day.

“Projects with doubtful economic returns can have significant economic as well as strategic consequences,” she wrote. 

Several Western countries have even begun to worry that there are security risks. Last week, a Pentagon report suggested that China is using the initiative to gain control of the developing world.

“Countries participating in BRI could develop economic dependence on Chinese capital, which China could leverage to achieve its interests,” the report said.

Jeanne Whalen in Washington contributed to this report.