Comedian Ricky Gervais has moved to defend himself after he made a controversial joke about AIDS on Twitter earlier this week, angering a substantial part of social media as it spread.

The 55 year old former star of ‘The Office’ sparked outrage when he answered a popular Twitter meme that asked “things you can say both during sex and during a funeral” by replying with “AIDS?” on Tuesday (June 20th).

Ricky GervaisRicky Gervais sparked outrage after making a joke about AIDS on Twitter

“This is legit asked of me every time a friend dies, which is ignorant, offensive and not f****** funny,” one irate Twitter user wrote. “The idea that you think AIDS is a death sentence is as dated as your comedy, Ricky,” wrote the editor of Gay Times Magazine Ryan John Butcher.

However, the only comment that actually prompted a reply from Gervais himself came from the official account of the National AIDS Trust.

More: Ricky Gervais defends himself over ‘dead baby’ joke

“Nice,” they wrote. "Why let accuracy about HIV get in the way of having a pop at an already very stigmatised group of people?! #keepingitclassy.”

“You mean, why aren't jokes factually accurate?,” Gervais replied. “Because they're jokes. I don't hold the same world view as my jokes. Most people get that.”

Gervais has frequently made his stance on free speech, comedy and causing offence clear throughout his career. Back in March this year while on his latest stand-up tour, he responded to a similar controversy he had stirred up when a grieving couple walked out of his Belfast show after he made a joke about dead babies.

“'Is there any subject you shouldn't joke about?' is no less ridiculous a question than ‘is there any subject you shouldn't talk about?’” he wrote back then, adding that “offence as the collateral damage of free speech.”

More: Ricky Gervais hosts the Golden Globes for the fourth time [archive]