Selena Gomez’s BFF Francia Raisa gave us all the feels when news broke that she’d donated a kidney to the “Same Old Love” singer last summer. But the heartwarming story about the lengths she went to for her friend almost had a devastating ending, with Raisa revealing to W Magazine that Gomez experienced a life-threatening complication after the transplant.

“A few hours after our surgery, I woke up and had a text from her that said, ‘I’m really scared,'” the actress said in the interview. “My kidney was very active, and when it turned I broke an artery. They had to take her into emergency surgery and get a vein from her leg and build a new artery to keep my kidney in place. She could have died.”

Luckily, doctors were able to save Gomez’s life, but the pair kept the procedure quiet at first. “We didn’t want to tell anybody because recovery was very hard for us, and we went through a depression at the time,” Raisa, who found it difficult to eat or drink anything post-surgery, told the mag. “We kind of just wanted to be normal and not have that attention on us. I really left it up to her.”

Finally deciding to share their story in October, Gomez revealed to Today‘s Savannah Guthrie that her friend of more than a decade had no hesitations about being a donor. “She volunteered!” the 25-year-old gushed at the time, adding that it was a huge weight off of her chest. “The thought of asking someone to do that was really difficult for me. … It is incredibly difficult to find a match.”

For her part, Raisa said the experience has given her a fresh, new perspective that’s stayed with her in the new year. “2018 I am just enjoying,” the Grown-ish star told W. “The show is a hit. My health is good. I have a new home, I have an amazing new boyfriend [cinematographer Chris Adkins] that I met on set. I went back to dance class for the first time last week. Now I’m more motivated and inspired than ever.”

Have you ever overcome a serious health scare? Tell us @BritandCo.

(Photo via Michael Kovac/Getty Images for Billboard)