Selena Gomez recently received a kidney transplant from television actor Francia Raisa due to her struggle with lupus, the actor and singer revealed on Thursday.

Gomez disclosed in an Instagram post confirmed by her publicist that she has been out of the spotlight this summer because she was recovering from the procedure. The 25-year-old calls the transplant “what I needed to do for my overall health”.

The post didn’t reveal Gomez’s current condition or say where or when the procedure took place. Gomez’s publicist declined to release more information. Gomez wrote “there aren’t words to describe” how she can thank Raisa, who she says gave “the ultimate gift and sacrifice by donating her kidney.”

“I am incredibly blessed,” she added.

Anna Wintour and Selena Gomez attend a show during New York Fashion Week on 12 September 2017. Photograph: Roy Rochlin/Getty Images for Coach

The Instagram post includes a picture of Gomez and Raisa holding hands while lying side-by-side in hospital beds and another photo of a scar on Gomez’s abdomen. The 29-year-old Raisa is best known for her role on the ABC Family series The Secret Life of the American Teenager. Raisa’s publicist didn’t immediately return a request for comment Thursday.

Gomez revealed her lupus diagnosis in 2015 and took a break from her career last year to deal with anxiety, panic attacks and depression stemming from her battle with the disease.

Lupus is an autoimmune disease, where the body mistakenly attacks its own tissues, sometimes including the kidneys. One healthy kidney is all the body needs, so a single kidney transplant can resolve the problem, said Dr David Klassen, chief medical officer for the United Network for Organ Sharing, which runs the nation’s transplant system.

“Lupus tends to be a disease of younger women, and younger people tend to do better with transplants than older patients, so the expectation is she would do quite well,” he said of Gomez.

Lupus also tends not to come back after the operation – “the drugs that prevent kidney rejection are also very good for treating lupus, the underlying disease,” Klassen said.

The causes of lupus are unknown. Symptoms can include bloody or foamy urine, unexplained weight gain, high blood pressure or swelling in the legs, ankles or around the eyes.

Only about 3% of kidney transplants are for lupus most are due to diabetes or chronic damage from high blood pressure.

There were about 19,000 kidney transplants in the US last year.

Gomez, whose hits include Good for You, Same Old Love and Come & Get It, has been in the spotlight since she was a child. She appeared on Barney and Friends before breaking through as a teen star on the Disney Channel’s Wizards of Waverly Place. She has a massive following on social media. Her 126 million followers on Instagram are the most on the platform.

She is due to star in a Woody Allen movie next year.

Gomez, who has been dating the singer The Weeknd for several months, also has had success behind the scenes as the executive producer of Netflix’s 13 Reasons Why, the controversial young adult series that became a summer sensation this year.