Comedian Trevor Noah apologized over the weekend after he was accused of racism on social media after he offensively mocked an Indian accent.

“As a comedian I use comedy to process pain and discomfort in my world but I am sorry that this hurt you and others, that’s not what I was trying to do,” Trevor Noah said.

Actually if you watch my stand up you'll see that I did make jokes after my mother was shot in the head. As a comedian I use comedy to process pain and discomfort in my world but I am sorry that this hurt you and others, that's not what I was trying to do. https://t.co/OuVnkHyIfG — Trevor Noah (@Trevornoah) March 2, 2019

“It’s amazing to me that my joke about the conflict in India and Pakistan trended more than the story of the actual conflict itself. Sometimes it seems like people are more offended by the jokes comedians make about an issue than the issue itself,” he said in another post.

It's amazing to me that my joke about the conflict in India and Pakistan trended more than the story of the actual conflict itself. Sometimes it seems like people are more offended by the jokes comedians make about an issue than the issue itself. — Trevor Noah (@Trevornoah) March 2, 2019

Noah angered many when he mocked the idea of a war between India and Pakistan by doing an over-the-top Indian accent, saying a war between the two nuclear powers would be “the most entertaining war of all time.”

Tensions between India and Pakistan heightened recently over border disputes.

It's sad when someone who's had a violent past mocks war through a Bollywood stereotype. @Trevornoah 's mother was shot in the head by her husband(Trevor's stepfather).Imagine someone making fun of it with a Xhosa stereotype – the tribe his mum belongs topic.twitter.com/pUFrm3Iavv — Zainab Sikander (@zainabsikander) March 2, 2019

Social media users lashed out at the liberal comedian, with one user calling his jokes “vile & despicable.”

This is just vile & despicable. You’ve called out racial injustice, violence against women, bigotry & colonial oppression in the past. And now @Trevornoah you’ve undone all you claimed to have stood for with this racist, insensitive & ignorant attempt at a quick gag. #TrevorNoah pic.twitter.com/L397Q7pTIc — Arunoday Mukharji (@ArunodayM) March 2, 2019

Just saw the Trevor Noah bit on India-Pakistan. India = not amused. "Not only did he fail to understand the severity of the situation between the two neighbouring countries, Noah took racist and stereotypical jibes at the Indian military forces."https://t.co/F0FFdUTQXT — Iain Marlow (@iainmarlow) March 1, 2019

Even Piers Morgan accused the Comedy Central star of being “despicably crass & racist.”

This is why I miss Jon Stewart. He would never have been so despicably crass & racist about such a serious situation.

Shame on you @Trevornoah. https://t.co/DGfcAPwL0A — Piers Morgan (@piersmorgan) March 1, 2019

Noah has previously stated that racism should be treated like a disease.

“This is the question I ask myself all the time. When are we going to start treating racism like a disease?” the 35-year-old said in 2017.

“That’s my problem. When do we start treating racism like a disease? Because right now, think about it, if you look at an alcoholic, we go this person has a problem, and we treat you … I’m just saying. There was a time you would say, oh you’re just a drunk. Now we say you’ve got a problem. We need to help you. I think it’s the same with racism.”