From the Penal Code to the Protection from Harassment Act, lawyers say Singapore has a range of laws to guard against racist comments.
They apply whether the comments were made online or involved a non-verbal gesture made in public. The law can also be invoked, even if there was no intention to hurt racial or religious feelings.
Take the case of 35-year-old Zainal Abidin Shaiful Bahari.
On Tuesday, the Singaporean was sentenced to three weeks' jail for comments he made on Twitter which he claimed was on a parody account satirising racially insensitive Singaporeans.
Posing as "SharonLiew86", Zainal had sent multiple racially offensive tweets in 2019 and last year.
Ms Diana Ngiam, one of his lawyers, told The Straits Times that her client did not specially direct the tweets at any individual. But he was still liable for committing acts against racial harmony - an offence under the Penal Code.
She noted that this offence merely requires that the offender knew his actions would promote enmity between different religious or racial groups, or that they are prejudicial to the maintenance of racial or religious harmony and are likely to disturb the public tranquillity.
The issue is in the spotlight after a number of incidents were highlighted on social media.
One involved a Ngee Ann Polytechnic lecturer who allegedly directed racist remarks at a mixed-race couple in Orchard Road last Saturday.
The lecturer can be heard in the video telling the couple that it is a disgrace for a Chinese girl and an Indian man to be together.
The lecturer has since been suspended from his teaching duties by the polytechnic and is currently assisting the police with their investigations.
Even if such comments are not intended to hurt racial sentiments, they can result in prosecution. But the bar set for such scenarios is high, said Ms Christine Low, a partner at Peter Low & Choo, citing a 2007 Parliament debate.
The issue had an airing in Parliament last month when Law and Home Affairs Minister K. Shanmugam pointed out that groups in Singapore have been fanning the flames of xenophobia and racism here.
He highlighted the alleged attack on Madam Hindocha Nita Vishnubhai, on May 7. The 55-year-old was brisk walking towards Choa Chu Kang Stadium when she had a run-in with a 30-year-old Chinese man.
The man shouted racial slurs at her for lowering her mask below her nose even though the Indian Singaporean explained that she was exercising. He then kicked her in the chest.
He was later arrested.
Lawyers point out that people who direct comments at others of the same race can also breach the same laws.
On May 2, a local Indian man allegedly uttered offensive remarks towards an Indian family and confronted the male member of the family for not wearing his mask. The incident was caught on video and later circulated online.
In the video, the Singaporean is seen directing xenophobic comments at the man, telling him not to "come and spread the virus". The second man said he had been drinking water.
The Singaporean was later arrested and investigations are ongoing.
Lawyers note that apart from racial enmity laws, the authorities can investigate such actions under the Protection from Harassment Act and Sedition Act.
There are also other provisions in the Penal Code which might apply, such as public nuisance.
Mr Shashi Nathan, who is a partner at law firm Withers KhattarWong and heads its dispute resolution department, said the specific facts will determine the offence.
After Mr Dave Parkash - the man who was confronted by the lecturer - shared the video on Facebook, some netizens asked if he was at risk of breaking the law himself.
Mr Nathan said: "If ultimately the intention (of Mr Parkash) was to raise awareness or to even show what happened, then I do not think it is a question of inciting any racial unhappiness... He is the victim."
The context of the video upload must also be taken into consideration, said Ms Low, adding that Mr Parkash is unlikely to be prosecuted because he had replicated the alleged racist comments by posting the video.
Mr Parkash had told ST in an earlier interview that he uploaded the video to raise awareness that racism continues to exist in Singapore, though he had not expected it to go viral.
By posting the video online, he hoped that people will know it is "not okay to shame others based on their race and skin colour", he said.