Mahathir Mohamad, once a loyal friend to China, is now leading the resistance against Chinese domination in the region.

The electoral tsunami that ended the 60-year reign of the ruling Barisan Nasional coalition in Malaysia earlier this year is still sending shockwaves across the world.

Prime Minister Mahathir Mohamad‘s stunning return to power, at the age of 93, has not only shaken up the country’s domestic institutions, but is also upending the country’s strategic alignments abroad.

According to a senior Malaysian official that I interviewed recently, the new government is gearing up to cancel Chinese infrastructure investments worth close to $40bn, as it cracks down on suspect deals which the previous administration concluded with Beijing.

Malaysia’s new government is also deeply worried about China’s maritime assertiveness and relentless militarisation of disputed land features in the South China Sea. Malaysia, a claimant state that controls several islands in the area, is perturbed by the prospect of Chinese domination of one of the world’s most important waterways.

As a result, the staunchly independent-minded Mahathir is seeking stronger strategic ties with Japan and the West in order to reduce his country’s deep dependence on China. In a remarkable turn of events, Malaysia, long seen as one of China’s closest friends, has now become a vortex of resistance against Beijing’s economic hegemony in Asia.

Strategic reboot

During his first stint in power (1981-2003), Mahathir was largely known for his eloquently critical stance against the West, particularly the United States’ military interventions in the Middle East.

The Malaysian leader criticised the US for unilaterally invading and destroying Muslim nations, supporting the state of Israel at the expense of Palestinian rights, and embarking on a so-called “global war on terror“, which brought American special forces to the jungles of Southeast Asia.

Deeply influenced by the legacy of the Non-Aligned Movement (NAM) leaders, including Gamal Abdel Nasser of Egypt and Sukarno of Indonesia, Mahathir advocated “Global South” solidarity against the onslaught of Western hegemony. In time, his staunchly independent-minded views won him global acclaim, turning him into a hero across the Muslim world and beyond.

When he was criticised for his authoritarian style of leadership, especially in the West, Mahathir controversially challenged the notion that human rights are universal, arguing that the principles of human rights and civil liberties are inimical to communitarian civilisations of the East.

As one of his advisers told me, back then the Malaysian leader saw China as a largely friendly nation, a rising power that could serve as a counterbalance to Western hegemony.

But much has changed in the last two decades.

Now the Asian geopolitical landscape looks completely different, with an ascendant China throwing its weight around and seeking to supplant the US as the new leader in Asia. Against this background, Mahathir has developed an increasingly critical view of China in recent years. Earlier this year, he openly characterised China’s rising assertiveness as “very worrisome”.

In a major break from his traditionally constructive comments on China, Mahathir described the current leadership in Beijing as being “inclined towards totalitarianism” and not afraid to “flex [its] muscles” in order to “increase [its] influence over many countries in Southeast Asia”.

An assertive Malaysia

More crucially, Mahathir has been critical of Beijing’s deals with Malasia’s previous administration, which sought large-scale Chinese financial assistance ($2.3bn) amid the 1MDB corruption scandal.

The Malaysian prime minister has accused his predecessor Najib Razak of selling out the nation to Beijing by striking corruption-infested deals to his own benefit and, in exchange, keeping quiet over China’s militarisation of South China Sea disputes at the expense of Malaysia.

As a result, the new Malaysian government is exploring various measures to better defend its interests in the South China Sea, including the fortification of its military presence in disputed land features under its control, more openly criticising China’s militarisation and domination of the South China Sea, and advocating a new peace formula to de-escalate tensions in the area.

More dramatically, however, Malaysia is considering the cancellation of big-ticket Chinese infrastructure projects, which cover strategic coastal regions embracing the Malacca Strait and the South China Sea.

Mahathir has raised concerns over the Chinese projects’ lack of transparency, economic viability and minimal-to-zero inclusion of local labour, technology and management. Grappling with ballooning debt (close to $250bn), Malaysia is also deeply concerned about falling into a Chinese “debt trap” like neighbouring Sri Lanka and Laos.

On top of the list of projects under reconsideration are the $20bn East Coast Rail Link under construction by China Communications Construction Company; the $10bn Melaka Gateway project led by PowerChina International; and the $2.5bn natural gas pipeline led by a subsidiary of China National Petroleum Corporation .

The Malaysian government has also imposed restrictions on the purchase of real estate units in the $100bn Forest City, a Chinese project which was almost exclusively marketed to Mainland buyers.

The Southeast Asian country, however, isn’t against Chinese investments per se. As Malaysian Senator and Deputy Defence Minister Liew Chin Tong told me last month, what Malaysia instead seeks are quality investments that are transparent, corruption-free and “create decent jobs” for locals.

Today Beijing sees in Mahathir not an old loyal friend, but a high-profile critic. Given Malaysia’s centrality to regional politics, it has now become the leading voice for more mutually beneficial and balanced relations between smaller Southeast Asian states and China.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.