Singer-actress Selena Gomez and “The Secret Life of the American Teenager” star Francia Raisa began their friendship 10 years ago in a hospital. And in a hospital recently, that friendship reached a new level when Raisa gave Gomez a kidney.

“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,” Gomez, 25, wrote on Instagram Thursday. “So I found out I needed to get a kidney transplant due to my lupus and was recovering,” she explained. “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.”

After thanking her doctors, the singer went on to say, “And finally, there aren’t words to describe how I can possibly thank my beautiful friend Francia Raisa. She gave me the ultimate gift and sacrifice by donating her kidney to me. I am incredibly blessed. I love you so much sis.”

The comments accompanied three photos, including one of Gomez’s surgical scar and another of the two friends in adjoining hospital beds, holding hands and smiling at each other.

The two had met in 2007, Raisa, 29, told Latina.com in 2013. “Disney and ABC Family had the stars of their shows go to the Children’s Hospital in Los Angeles,” she said. “Selena and I were in the same group and we just clicked.”

Gomez, who starred from 2007 to 2012 on Disney Channel’s “Wizards of Waverly Place” before becoming a pop-music star, went public with her lupus, a chronic autoimmune disease, in October 2015. For nearly two years she had fielded rumors bout why she had checked herself into an Arizona rehab facility in January 2014 and cut short a tour. “I was diagnosed with lupus,” she told Billboard magazine, “and I’ve been through chemotherapy. That’s what my break was really about. I could’ve had a stroke.”

advertisement | advertise on newsday

Her Instagram post Thursday included a link to the Lupus Research Alliance.

Raisa, who stars with Yara Shahidi and others in Freeform’s upcoming “black-ish” spinoff, “Grown-ish,” has not commented on social media.