“I’m very aware some of my fans had noticed I was laying low for part of the summer and questioning why I wasn’t promoting my new music, which I was extremely proud of,” the 25-year-old wrote. “So I found out I needed to get a kidney transplant due to my Lupus and was recovering. It was what I needed to do for my overall health.”

“I honestly look forward to sharing with you, soon my journey through these past several months as I have always wanted to do with you,” she continued. “Until then I want to publicly thank my family and incredible team of doctors for everything they have done for me prior to and post-surgery.”

The donation came from her friend and actress Francia Raisa, who Gomez noted gave her “the ultimate gift and sacrifice.” She added: “I am incredibly blessed. I love you so much sis. Lupus continues to be very misunderstood but progress is being made.” Gomez ended her post by encouraging people to visit the Lupus Research Alliance website.

Gomez shared a series of images from the surgery, including one of her scar. (Photo: @selenagomez/Instagram)

The singer also shared a photo of herself and Raisa holding hands while lying in hospital beds. Both are hooked up to monitors and wearing breathing tubes.

Gomez revealed toBillboard in 2015 that she has lupus, a chronic autoimmune disease that can damage any part of a person’s body. Lupus causes something to go wrong with a person’s immune system, making it unable to differentiate between bacteria, viruses, germs, and your body’s healthy tissue, according to the Lupus Foundation of America. As a result, their immune system attacks and destroys healthy tissue.

About 1.5 million Americans have lupus, and while anyone can have the disease, it disproportionally affects women, many of whom develop it between the ages 15 and 44, the Lupus Foundation of America says.

Lupus manifests itself differently in people and can cause joint pain, kidney problems, blood clots, infections, or skin issues, among other things. Most people with lupus have episodes, called flares, when their symptoms get worse for a while and then improve or go away for a period of time, the Mayo Clinic says.

According to the scientific journal Lupus, most patients with systemic lupus erythematosus, the most common form of the disease which causes kidney inflammation, among other issues, are good candidates for a kidney transplant.

About 60 to 75 percent of lupus patients will eventually develop a kidney problem, Eliot Heher, MD, a nephrologist and medical director of the Kidney Transplant Program at Massachusetts General Hospital, tells Yahoo Lifestyle. Some are responsive to immunosuppressive medications, especially if lupus is caught early, but others may not respond well to the medication and progress to end stage kidney disease — and that’s serious. “Everyone who had this before the 1960s died of it,” Heher says.

Now patients have two options: dialysis, which is a process that removes waste and excess water from the blood as an artificial replacement for lost kidney function, or transplant. Transplantation is generally preferred, Heher says, but it can take time if someone doesn’t have a live donor (i.e., a friend or relative willing to donate a kidney) since they’ll have to go on a waiting list. For those who have a live donor, it’s simply a matter of evaluating the donor and then scheduling the surgery, he says.

Unfortunately, using a living donor isn’t as simple as having a friend or loved one volunteer. Living donors must undergo specific testing to make sure they’re healthy enough to donate and that their kidney will be a match for the patient, Gary S. Gilkeson, M.D., chair of the Lupus Foundation of America Medical Scientific Advisory council, tells Yahoo Lifestyle. That includes blood testing to make sure the blood types are a match and making sure immune factors will work well together. “You want these things to match so that the kidney won’t be viewed as foreign by the patient’s body and rejected,” he says.

With a kidney transplant, the old kidneys are almost always left in place while the new kidney is placed in the lower abdomen, usually on the right side, Heher says. “The old kidneys are in the back and quite deep, and getting them out adds surgical complexity,” he says. “From a medical point of view there’s no reason to remove them with few exceptions.”

After a person undergoes a kidney transplant, they’ll need to be on several anti-rejection medications and undergo testing regularly for a short period of time, followed by annual checkups. But they can expect to go about their normal lives after they recover from the surgery, Heher says.

Lupus patients can “absolutely” go on to lead a long, healthy life after a kidney transplant, Heher says. “It’s quite remarkable — the lupus goes away,” Heher says. “Many of my lupus patients who have transplants don’t even see their doctors for lupus anymore.”