Malaysian Prime Minister Najib Razak said that former colonial powers should not lecture countries they once exploited on their internal affairs, a Chinese newspaper reported on Wednesday, in a veiled attack on the West as he looks to strengthen ties with China. Najib’s visit to Beijing follows that of Philippine President Rodrigo Duterte, who announced a “separation” from the United States and signed a raft of memoranda of understanding for Chinese investment in the country.

Najib, who is on a six-day visit to China, said in an editorial in the state-run China Daily that larger countries should treat smaller countries fairly.

“And this includes former colonial powers. It is not for them to lecture countries they once exploited on how to conduct their own internal affairs today,” he wrote.

The Philippines is a former Spanish and U.S. colony, and Malaysia a former British colony.

Najib is looking to strengthen ties with China after July lawsuits filed by the U.S. Justice Department implicating him in a money-laundering scandal. Najib has denied any wrongdoing and said Malaysia will cooperate in the investigations.

More than $3.5 billion was allegedly misappropriated from 1MDB, according to civil lawsuits filed by the Justice Department. The probe has strained ties between Malaysia and the United States, with Najib dismissing it as foreign interference in Malaysia’s affairs.

The shift by the Philippines and Malaysia is being widely seen as China’s counter to U.S. influence in the region.

Najib also wrote that disputes in the South China Sea should be resolved through dialogue in accordance with rule of law.

China claims most of the energy-rich waters through which about $5 trillion in ship-borne trade passes every year. Neighbours Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have claims.

“When it comes to the South China Sea, we firmly believe that overlapping territorial and maritime disputes should be managed calmly and rationally through dialogue, in accordance with the rule of law and peaceful negotiations,” he said.

Chinese Vice Foreign Minister Liu Zhenmin said on Tuesday that Malaysia had pledged with Beijing to handle South China Sea disputes bilaterally.