Malaysian Prime Minister Najib Razak led thousands of Muslims in a rally Friday to show solidarity with Palestinians, slamming the US decision to recognise Jerusalem as Israel's capital.

Najib told the crowd that Malaysia will do all it can to "save Jerusalem" and that he will not be cowed by the US nor by his close ties with President Donald Trump. Najib in September met Trump at the White House, and last month, posted a photograph of himself with Trump on Twitter on the sidelines of a regional meeting in Manila.

Malaysia on Thursday joined more than 120 countries voting in favour of a UN General Assembly resolution calling for the United States to drop its recognition of Jerusalem as Israel's capital, ignoring a threat by Trump to cut off financial aid to countries voting against his move.

"Yes, I have visited the White House and yes, Trump is a good acquaintance but I will not pawn the sanctity of Islam," Najib said to loud cheers at the protest outside a mosque in the government capital of Putrajaya after Friday prayers.

"We are firm in our stand. We support the formation of a Palestine that is free and sovereign. We demand a Palestine with dignity and pride. We want East Jerusalem as the capital of Palestine," he said.

Earlier this month, Trump reversed decades of US policy by announcing the United States recognised Jerusalem - home to major Muslim, Jewish and Christian holy sites - as the capital of Israel and would move its embassy there.

Najib vowed to hold weekly protests in support of Palestinians. Deputy Prime Minister Ahmad Zahid Hamidi told local media that the Cabinet would next month discuss a proposal by Najib for Malaysia to follow Turkey in opening an embassy in east Jerusalem to recognise the city as the Palestinian capital.