Selena Gomez has spoken out after a recent episode of legal drama The Good Fight made a “tasteless” reference to her kidney transplant.

The American singer and actress, 29, underwent an operation in 2017 after suffering complications from the autoimmune disease lupus.

During the fourth episode of the fifth season of The Good Fight, which aired on July 15, a reference to Gomez was made in a scene where characters debated the effects of cancel culture on comedy and which topics can and cannot be discussed.

Jay Dipersia (played by Nyambi Nyambi) asked Marissa Gold (Sarah Steele) and Jim (Ifadansi Rashad) “is there anything we can’t do”, to which they listed necrophilia, autism and Selena Gomez’s kidney transplant.

Gomez wrote on Twitter: “I am not sure how writing jokes about organ transplants for television shows has become a thing but sadly it has apparently.

“I hope in the next writer’s room when one of these tasteless jokes are presented it’s called out immediately and doesn’t make it on air.”

After the episode aired, the singer’s fans started the trend “Respect Selena Gomez”, and she thanked them for their support.

“My fans always have my back. LOVE YOU,” she added.

The Good Fight is a legal drama starring Christine Baranski, and has aired in the US since 2017.

Former Disney Channel star Gomez has been open about her health struggles and previously displayed her surgery scar on Instagram as part of a campaign message that “all bodies are beautiful”.

She received a kidney from friend Francia Raisa in 2017 and said at the time that Raisa “gave me the ultimate gift and sacrifice by donating her kidney to me. I am incredibly blessed”.

The Good Fight incident comes after the Peacock streaming channel’s Saved By The Bell reboot in November 2020 was also criticised for joking about Gomez’s health struggles.

In a statement issued to the Hollywood Reporter, Peacock, NBC Universal and the show’s executive producers said: “We apologise. It was never our intention to make light of Selena’s health.

“We have been in touch with her team and will be making a donation to her charity, the Selena Gomez Fund for Lupus Research at USC.”

Paramount+ and CBS Studio Centre have been contacted for comment.