The leaders of Southeast Asia’s Muslim majority nations must walk a delicate diplomatic tightrope, observers say, as they balance cosy Washington ties and intense domestic pressure to push back harder against President Donald Trump for his recognition of Jerusalem as the capital of Israel.

Malaysian Prime Minister Najib Razak and Indonesian President Joko Widodo this week joined the chorus of Muslim leaders slamming the move.

But signs that they continue to have an eye on being in Trump’s good books – in part as a counterbalance to China – could prove costly because of the resonance the Palestinian cause has with their political bases.

As was the case in the aftermath of Trump’s controversial January decision to seal off American borders to citizens of seven Muslim-majority countries, the leaders’ criticism was sharply nuanced and did not directly target the US president.

While Widodo has so far escaped criticism, the Malaysian leader has not been so lucky.

Within hours of Najib’s speech on Wednesday against the US move at the emergency summit of the Organisation of Islamic Cooperation (OIC), he faced stinging criticism for his hedging tactics.

The Malaysian premier had flayed Washington for “adding fuel” to the Palestinian-Israeli conflict, but Fahmi Fadzil, a spokesman for the opposition People’s Justice Party, said the leader’s words belied a hypocritical stance towards Trump.

“Why does [the ruling party] oppose the US stand on Baitul al-Maqdis [Jerusalem] but still want to invest billions of dollars in the US economy?,” asked Fahmi in an op-ed on the Malaysiakini website. “The government needs to be consistent. Don’t gather in front of the US embassy but at the same time go to the White House bringing investments,” he said.

Najib announced during an official visit to Washington in September that the state pension fund would invest up to US$4 billion in Trump’s master plan to overhaul American infrastructure.

Elsewhere, Mahathir Mohamad, the former prime minister who now leads the opposition coalition, in a protest rally late on Friday branded Trump an “international bully” and a “villain”.

Arsonist in the house: Trump shows cynicism on Jerusalem

The comments by the 92-year-old Mahathir, renowned for his anti-Israel stance, stood in stark contrast to Najib’s decision not to take on Trump more directly at the Istanbul summit.

Najib’s measured stance mirrored those of Widodo and Gulf leaders.

Peter Mandaville, a former adviser on political Islam at the US state department, said the cautious approach towards criticising Trump at the OIC summit reflected “a pattern of action that began with the ‘Muslim ban’ earlier this year”.

“I think major Muslim leaders in both the Middle East and Asia have decided they are willing to tolerate a lot of Islamophobia and unilateralism on the part of the United States so long as Washington takes a tough line with Tehran and Beijing,” said the professor of international affairs at George Mason University.

Najib and Widodo were signatories to the summit’s final communique that called Trump’s move “a deliberate undermining of all peace efforts, an impetus for extremism and terrorism, and a threat to international peace and security”.

The statement did not agree on concrete sanctions against Israel and the US, and did not contain the fierce rhetoric of Turkish President Recep Tayyip Erdogan, who in his speech at the summit assailed Trump for having a “Zionist mentality”.

Trump’s decision to recognise Jerusalem as the capital of Israel was a departure from American foreign policy in the years since the 1980 declaration by Tel Aviv that the holy city would be its eternal and indivisible capital.

Trump’s vanishing act: a metaphor for the US in Asia?

Israel seized and annexed the eastern part of Jerusalem in the 1967 Middle East War, but much of the international community has not recognised that move.

Palestinians hope to establish a sovereign state in the West Bank and Gaza – controlled by Hamas – with east Jerusalem as its capital.

Najib said after the summit that he hoped to take a “moderate approach” in dealing with the US move, and dismissed calls for restrictions in trade and investment between the two countries.

With geopolitics on the leaders’ minds, experts said they did not expect a shift in stance any time soon.

The US is Indonesia’s second-largest trading partner after China, and Malaysia’s third-largest.

“Foreign policy is multifaceted, multi-track, and multidirectional and so it is entirely possible to champion the Palestine cause on the one hand but also keep good ties with Trump’s White House on the other,” said Mustafa Izzuddin, a Southeast Asia politics expert at Singapore’s ISEAS Yusof Ishak Institute.

Mandaville, the Barack Obama-era Washington official, said “the most effective response to this American shift on Jerusalem would be for the world to speak diplomatically with one voice to impress on Israel and the US that they are out of line with the international consensus on this issue”.

“Asian leaders should work in concert with their European and African counterparts to make clear that a negotiated, two-state solution is the only viable way forward,” he added.