KUALA LUMPUR: Malaysian police have cautioned the country's social media users to refrain from posting "provocative" content on race and religion after a divisive general election on Saturday that ended in a hung parliament.

Two major alliances are now racing to secure support from other parties to form the government: a multiethnic, progressive bloc led by veteran opposition leader Anwar Ibrahim and a conservative Malay Muslim coalition led by former prime minister Muhyiddin Yassin.

The police warning comes as race-based narratives dominated political chatter on social media during and after the election, according to an online hate speech monitoring project run by the Malaysia-based Centre for Independent Journalism.

It also comes as electoral gains by an Islamist party that has touted sharia law raised fears among investors over its potential impact on policies.

Race and religion are thorny issues in multicultural Malaysia, which has a majority of mostly Muslim ethnic Malays alongside significant ethnic Chinese and ethnic Indian minorities of other faiths.

Police said they had detected social media content that touched on racial and religious sentiments and insulted the country's monarchy after the election.

"Stern actions... will be taken against users that attempt to incite a situation that can threaten public safety and order," Inspector-General of Police Acryl Sani Abdullah Sani said in a statement late Monday.

Malaysia's King Al-Sultan Abdullah has given political parties until 2 p.m. (0600 GMT) on Tuesday to put together a government alliance, after no coalition won enough seats for a parliamentary majority.

Muhyiddin's bloc includes the Islamist party PAS, which has advocated for a strict interpretation of sharia, while Anwar's alliance includes the Democratic Action Party, a predominantly Chinese party unpopular with many conservative Malay voters.

Malaysian social media users on Monday reported a slew of posts on short video platform TikTok after the election that mentioned a deadly race riot in Kuala Lumpur on May 13, 1969.

Around 200 people were killed in those clashes, which took place after opposition parties supported by the ethnic Chinese community made inroads in a general election three days earlier.