Selena Gomez has revealed that she had a kidney transplant operation this summer linked to her lupus.

In an Instagram post, the singer says that her friend Francia Raisa donated an organ to her and says she wanted to explain why fans hadn't heard much from her despite having new music out.

"So I found out I needed to get a kidney transplant due to my Lupus and was recovering," she writes.

"It was what I needed to do for my overall health."

Selena Gomez also thanked her friend, The Secret Life of the American Teenager actress Francia Raisa, in her Instagram post.

"There aren't words to describe how I can possibly thank my beautiful friend Francia Raisa," she writes.

"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 pair first met at a Disney and ABC charity event at a children's hospital in 2007.

Francia Raisa also posted on Instagram.

Selena Gomez released the first single from her new untitled album, It Ain't Me featuring Kygo, in March.

Since then Bad Liar and Fetish have come out but she hasn't been out promoting the tracks because of her operation.

Her first public appearance after recovering from the surgery was in New York with boyfriend The Weeknd last Friday night.

She also took time off social media last year to deal with panic attacks, anxiety and depression.

The 25-year-old says her ongoing mental health problems are a side-effect of her lupus diagnosis last year.

Lupus affects the body's immune system.

The symptoms of the disease include extreme tiredness, rashes (especially on the face, wrists and hands), joint pain and swelling.

In her post, she says not enough is known about the condition.

"Lupus continues to be very misunderstood but progress is being made."

Find us on Instagram at BBCNewsbeat and follow us on Snapchat, search for bbc_newsbeat