Avicii's incredibly generous nature has been revealed a week after his death - as it emerged he spent his final hours inside a luxurious farmhouse owned by a relative of the Sultan of Oman.

The Swedish DJ, real name Tim Bergling, had been in Oman on holiday in the beach resort of Muscat Hills shortly before his death, which his family has hinted was suicide.

And it's alleged he died at this private Muscat farmhouse surrounded by palm trees and kept secure with an electric gate so he could admit visitors or keep himself to himself.

Avicii was staying in Oman in the days before his shock death (
Image:
REUTERS)
The luxury farmhouse where he's said to have spent his last hours (
Image:
REX/Shutterstock)
The secluded property has a security gate to keep out any nosy passersby (
Image:
REX/Shutterstock)

He'd reportedly been staying there amid the lush vegetation and total privacy.

No cause of Avicii's death has yet been publicly confirmed, but it's known his body was taken to the local police hospital after emergency services found him.

In the week since his death, stories of Avicii's generosity have painted the picture of the shy superstar who was desperate to use his celebrity for good - despite not enjoying the limelight.

Tim had been stauing at the Muscat Hills Resort shortly before his death (
Image:
REX/Shutterstock)
He looked cheery as he posed with fans (
Image:
REX/Shutterstock)

It's thought Tim's DJing tours combined with his chart-topping songs netted him a personal fortune of some £60million, including the $250,000 per performance he'd take home after selling out the world's biggest clubs.

But rather than keep it to himself, Avicii donated his entire income - some $1million - from his 27-date 2012 tour of the US to the hunger relief charity Feeding America.

Then in 2013 he handed over another million euros to the Swedish aid organisation Radiohjälpen, whose secretary-general Anna Hedenmo told her Twitter followers of his kindness.

The police hospital where Tim's body is thought to have been taken (
Image:
REX/Shutterstock)
No cause of death has yet been confirmed (
Image:
REX/Shutterstock)

"I discovered when I started making money that I didn't really need it," Tim said in a 2013 interview.

"When you have such an excess of money you don't need, the most sensible, most human and completely obvious thing is to give to people in need."

Two years later, in 2015, Tim chose to highlight the issues of gang violence and human trafficking when he directed the music videos of his two songs Pure Grinding and For A Better Day.

At the time, he said: "All the songs have a story I wanted to tell."

Avicii had battled health problems - both mental and physical (
Image:
WENN.com)
He donated millions to help with hunger relief (
Image:
REUTERS)

The globally famous star, however, never liked the spotlight and would turn to alcohol to calm his nerves before a big show.

By 2016 performing every night in a different city had brought him to breaking point, and he decided to quit touring after doing more than 800 gigs in eight years.

He also battled mental and physical health problems, in part caused by his heavy drinking, and friends expressed concern he was overdoing it.

Earlier this week, Tim's family released an open letter in which they hinted he had taken his own life.

The DJ had said he didn't see the need to keep hold of his money (
Image:
REX/Shutterstock)
One of the final pictures taken of Tim, with a fan, is Muscat (
Image:
@muscathillsresort /Instagram)

In their letter published on Aftonbladet and translated from its original Swedish, they wrote: "Our beloved Tim was a seeker, a fragile artistic soul searching for answers to existential questions.

"An over-achieving perfectionist who travelled and worked hard at a pace that led to extreme stress.

"When he stopped touring, he wanted to find a balance in life to be happy and be able to do what he loved most – music."

The DJ's family have hinted he took his own life (
Image:
Instagram/ muscathillsresort)

They went on: "He really struggled with thoughts about Meaning, Life, Happiness. He could not go on any longer. He wanted to find peace.

"Tim was not made for the business machine he found himself in; he was a sensitive guy who loved his fans but shunned the spotlight.

"Tim, you will forever be loved and sadly missed.

"The person you were and your music will keep your memory alive. We love you. Your family."