About 55,000 people dressed in white flooded a historic square in downtown Kuala Lumpur, according to police, chanting "God is great" and brandishing banners that read "Long live the Malays".
Large numbers of police were on the streets and major roads were closed for the event, which was the first major rally since Prime Minister Mahathir Mohamad won a shock election victory in May and toppled the scandal-mired old regime.
Race and religion are sensitive in Malaysia, which is home to sizeable ethnic Chinese and Indian communities, and the Muslim Malay majority appears to be feeling increasingly insecure under a new government that is more representative of minorities.
The rally was originally intended as a protest against a plan by the government to ratify a UN convention which aims to eliminate racial discrimination.
Three killed in Malaysia shopping mall explosion
Authorities abandoned the plan after opposition from conservative politicians and Malays, who feared the treaty could erode their privileged position in society.
But Muslim groups pushed ahead with Saturday's demonstration, which — alongside the convention —became about the bigger issue of defending Islam and decades-old affirmative action policies that benefit Malays.
"If Islam is disturbed, is race is disturbed, if our rights are disturbed, then we will rise," opposition leader Ahmad Zahid Hamidi, whose United Malays National Organisation (UMNO) party was ousted at this year's election, told the gathering.
Participant Arif Hashim, 26, told AFP that other races must not "challenge the rights of the Malays. As a Muslim, I want Islam to be the first (priority) in Malaysia."
Among those attending was disgraced ex-premier Najib Razak, who has been arrested and charged over the scandal surrounding state fund 1MDB since losing power in May.
PM Imran to leave for Malaysia on Nov 20
Police said the gathering passed off peacefully and the crowds dispersed in the late afternoon.
Malays — who make up some 60 per cent of the country's 32 million people — have for decades enjoyed substantial state benefits, such as financial handouts and help getting government jobs.
Critics argue the system has been abused by a corrupt elite and is in urgent need of reform, although there is no indication Mahathir's administration is about to make major changes in such a sensitive area.
UMNO — which ruled Malaysia at the head of a coalition for six decades until its election defeat — was a major backer of the rally, with analysts saying it was using the event to divert attention from its troubles.
The party, long a champion of the Malays, has been engulfed in scandal and infighting since being ousted.
As well as Najib, new leader Ahmad Zahid has been charged with corruption.
Policies favouring Malays were introduced after riots between members of the Malay and Chinese communities in 1969 that left nearly 200 people dead.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ