DJ Deadmau5 (Charley Gallay/Getty for Activision)

Music producer Deadmau5 has apologised after he was slammed for using “homophobic and transphobic” slurs during a heated Twitter argument about his mouse helmet.

The Canadian “Ghosts ‘n’ Stuff” artist, real name Joel Zimmerman, had lashed out on Twitter on Saturday after people made fun of his signature mouse helmet, which he wears for DJ sets.

Responding to a quip about his neck getting sweaty while wearing the oversized gear, he shot back: “There’s a fan in it. let’s be honest here, there are far worse fates, and if im [sic] a betting man, i’ll bet you suck a guy off for 40 grand ZERO f**king questions asked. So don’t talk to me about mouse heads.”

The comment sparked challenge from a second user, who waded in: “Hey maybe don’t say homophobic shit like ‘I bet you suck a guy off’ as if that’s something to be ashamed of or ridiculed for? Not a good look for a high profile musical artist.”

When the user asked “How does this make your tweet any better[?],” Deadmau5 shot back: “it just illustrates the obvious f**king point here. women don’t posses penises. you’ll find out when you’re older.”

The comments quickly circulated online, with several calling on Zimmerman—hardly the first celebrity to have an ill-judged Twitter moment—to apologise

Deadmau5 responded: “fine. how many biological women have you sucked off? there i fixed it.”

Writer Amanda Jette Knox wrote: “So disappointed to find out Deadmau5 is posting transphobic statements about what genitals define a woman. But not as disappointed as my kids are going to be.

“Last year, we took our trans daughter to his concert in Montreal for her birthday. She’s been a huge fan.”

Others lashed out at his comments, as the artist continued to double down.

Responding to criticism, he said: “Are you guys all part of the same online club or something? I feel like all this sjw crusading is all coming from the same tree fort in some backyard in Toledo. Help me out.”

“Sjw” stands for “social justice warrior,” a pejorative term for progressive activism popularised by online conservatives.

Deadmau5 continued to clash with critics, blocking people who challenged his comments and occasionally responding.

He claimed: “Someone took an angry comment i made, (as stupid as it was) and started making wildly stupid accusations that I was trans-phobic, I typically block those because I don’t care for that level of idiotic toxicity. We also support Trans Children, Inc.”

However after days of standing by the comments he has now issued an abrupt, semi-apology.

In a tweet, he wrote: “I wasn’t trying to make blatant transphobic statements, just got into a heated arguement [sic] with some dude online said something dumb and the internet took it way into somewhere unintended. I’ve since deleted the tweets, I’m not that kind of person. My apologies.”