By Agence France-Presse
Two years after his unusually early retirement from touring, the Swedish DJ was found dead in the Gulf sultanate's capital Muscat.
"It is with profound sorrow that we announce the loss of Tim Bergling, also known as Avicii," his management said in a statement, without specifying the cause of death.
"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."
Maitrai Joshi, a DJ at the Muscat Hills Resort, said he spotted Avicii and understood the dance superstar was on vacation in Oman for the first time and had extended his stay.
"I saw him again the next day and again he was friendly, humble and took some photos," Joshi told AFP by email.
Avicii was among the first DJs to break through in the mainstream as electronic dance music grew over the past decade from nightclubs to Top 40 radio. He created a global hit out of Coldplay's "A Sky Full of Stars," to which he added a layer of energetic electronica.
He also helped produce Madonna's last album. On Instagram, the pop superstar posted a picture of herself in the DJ booth with Avicii and wrote: "So Tragic. Goodbye Dear Sweet Tim. Gone Too Soon."
His biggest individual hits included "Wake Me Up," which went to number one across Europe in 2013 and featured the soul singer Aloe Blacc.
In 2015, he DJ-ed the wedding reception of Sweden's Prince Carl Philip and his bride Sofia. The couple mourned him in a statement, saying: "We had the honor to have known him and admired him both as an artist and the beautiful person that he was."
Swedish Prime Minister Stefan Lofven called Avicii "one of the greatest names of music in Sweden in modern times."
- Scene 'not for me' -
While the death came as a shock, Avicii has spoken publicly in recent years about his health problems, including pancreatitis, triggered in part by excessive drinking.
The condition forced him to cancel shows in 2014 as he had to have his gallbladder and appendix removed.
In 2016, Avicii stunned fans by retiring from touring when he was just 26, saying that he wanted to leave the high-flying electronic music lifestyle.
"The scene was not for me," he told music magazine Billboard after his decision.
"It was not the shows and not the music. It was always the other stuff surrounding it that never came naturally to me. All the other parts of being an artist," he added.
"I'm more of an introverted person in general. It was always very hard for me. I took on board too much negative energy, I think."
Avicii later returned to the more quiet life of a studio artist. Last year, he put out a six-song EP that featured British pop singer Rita Ora.
- 'Genius and musical innovator' -
The son of Anki Liden, a prominent Swedish actress, Avicii had his start uploading tracks on the internet and was discovered by Dutch superstar Tiesto, who invited him to play at his residency in the clubbing hub of Ibiza.
His breakthrough single, "Levels," adapted a sample of soul singer Etta James and earned him one of his two Grammy nominations.
He took his stage name from the Sanskrit word for the lowest level of hell in Buddhism, adding an additional "i" at the end.
In 2014, he was tied with Tiesto as the third top-grossing DJ in the world on the list of Forbes magazine, which estimated his earnings for the year at $28 million.
Pop star Charlie Puth paid tribute to Avicii as "the man who really opened my eyes to what my production could one day sound like."
"Avicii was a genius and a music innovator, and I cannot believe he is no longer with us. RIP to the very best," Puth wrote on Twitter.
Deadmau5 -- a fellow top DJ known for his outspokenness who had mocked Avicii when he quit touring so young -- offered his "sincerest and most heartfelt condolences."
"Banter aside, nobody can deny what he has accomplished and done for modern dance music and I'm very proud of him," Deadmau5 tweeted.
Electronic producer Diplo on Instagram called Avicii "the gold standard" in setting musical trends.
"I know you had your demons and maybe this wasn't the right place for you sometimes, but we need to protect true artists like you at all costs because there are not enough left and we are losing too many," Diplo said.