He was 28.

"It is with profound sorrow that we announce the loss of Tim Bergling, also known as Avicii," a statement to CNN read. "He was found dead in Muscat, Oman this Friday afternoon local time, April 20th. The family is devastated and we ask everyone to please respect their need for privacy in this difficult time. No further statements will be given."

Avicii was one of the most successful touring DJs in the industry, working with artists including Madonna. He had a crossover pop hit in 2013 with "Wake Me Up."

But he also saw the downside of fame in the electronic dance music genre known as EDM.

"It's very easy to become too attached to partying," he told Rolling Stone last year. "You become lonely and get anxieties. It becomes toxic."

He retired from performing in 2016 after a string of health issues, including acute pancreatitis.

"Yeah I was drinking way too much, partying in general way too much," he said. "Then I got a pancreatitis attack [at 21], which is very rare. So that forced me to do a 180 and stop drinking."

The DJ explained in a 2017 posting on his site that he had no intention of giving up music completely, writing "We all reach a point in our lives and careers where we understand what matters the most to us."

"For me it's creating music," he wrote. "That is what I live for, what I feel I was born to do."

Avicii also wrote that he was heading back into the studio to make more art.

"The next stage will be all about my love of making music to you guys. It is the beginning of something new," his posting said. "Hope you´ll enjoy it as much as I do."

The social media tributes from fellow musicians and artists poured in as soon as the news broke on Friday afternoon. Some tweets have been shared thousands of times.

Producer Hardwell shared a photo of himself with Avicii and wrote a tribute in which he thanked him for "changing the world with your amazing music."

Can't believe this, I'm gonna miss you so bad. From your first show where we played together, to all the amazing memories we shared. Thank you for changing the world with your amazing music and for being such an inspiration. I'm gonna miss you brother, until we meet again! ❤ pic.twitter.com/FjJyLA5Ohc — Hardwell (@HARDWELL) April 20, 2018

Devastating news about Avicii, a beautiful soul, passionate and extremely talented with so much more to do. My heart goes out to his family. God bless you Tim x — Calvin Harris (@CalvinHarris) April 20, 2018

Wow, I would like to take a moment to pay tribute to the man who really opened my eyes as to what my productions could one day sound like. @Avicii was a genius and a music innovator, and I can not believe he is no longer with us. RIP to the very best. — Charlie Puth (@charlieputh) April 20, 2018

Horrible to hear about Avicii, only 28 years old... 😕

RIP 💜 — Jack Maynard (@Jack_Maynard23) April 20, 2018

Damn Dude RIP #Avicii 🙏🏽 — DJ Pauly D (@DJPaulyD) April 20, 2018

Such sad news to hear about Avicii passing. Too young and way too soon. My condolences go out to his family, friends and fans x — DUA LIPA (@DUALIPA) April 20, 2018

R.I.P Avicii 😣 I can't believe this.... You were taken from us way too soon. You'll never be forgotten man. This hurts 💔 — Dante D'Angelo💧 (@itsdantedangelo) April 20, 2018

No words can describe the sadness I'm feeling right now, hearing about Avicii passing away....💔

Thoughts go out to his family and friends... — Zedd (@Zedd) April 20, 2018

I have no words. I remember how amazing it was to make Lonely Together and it felt like just yesterday we were talking. Condolences to Avicii's family, friends, and the fans who supported him. May he rest in peace. Gone too soon. I'm devastated. Heartbroken. — Rita Ora (@RitaOra) April 20, 2018

my sincerest and most heartfelt condolences to the friends, fans and families of @Avicii :( Banter aside, nobody can deny what he has accomplished and done for modern dance music and im very proud of him. — Goat lord (@deadmau5) April 20, 2018

Oh my god truly devastated for Avicii very very sad news way to young ... what a talent he was. rest in peace x — Liam (@LiamPayne) April 20, 2018

"Devastating news about Avicii, a beautiful soul, passionate and extremely talented with so much more to do," fellow superstar DJ Calvin Harris tweeted. "My heart goes out to his family. God bless you Tim."