Police Scotland are investigating, but said they were not looking for anyone else in connection with the incident.

The Wickerman Festival, which he co-founded with Sid Ambrose, has been held at Mr Gilroy’s East Kirkcarswell Farm for the past 13 years and regularly attracts almost 20,000 ­revellers.

Mr Gilroy, who is married to Dumfries and Galloway councillor Patsy Gilroy, was taken to Dumfries and Galloway Royal Infirmary earlier in the day but last night his family announced he had died.

The Gilroy family said: “It is with immense sadness we confirm Jamie’s death.

“This has come as a huge shock to us, to his many friends, and to members of the local and wider festival community in which he played such a vibrant part.

“We’d like to thank everyone for their support at this very difficult time.”

Police officers spent most of the day at the farm, home to the two-day Wickerman Festival which is held each July.

A local resident, who asked not to be named, said: “It is a tremendous shock for everyone around here. He was very well known, not only around here but all over the country through the Wickerman Festival.

“It is a terrible thing for the family and everyone’s thoughts are with them at this time.”

The festival is often called Scotland’s alternative music ­festival.

It was started in 2001 when the festival’s former artistic director Mr Ambrose thought the area needed and deserved a music festival, while Mr Gilroy wanted to diversify his farm’s activities.

On Wednesday, Mr Gilroy was at a meeting of the Stewartry district licensing board, applying for licences for next year’s festival.

Mr Gilroy is a Conservative councillor and was first elected in 1999, previously serving as councillor in Kirkcudbright.

The couple have a daughter who is married with children, but lost their son in a car accident in Australia in 1994, at the age of 21.

Speaking to The Scotsman in 2010, Mr Gilroy said: “My only son was killed in a car accident when he was 21. That brought me up short and made me realise that a lot of people spend a lot of time worrying about trivia.

“I’m not somebody who suffers small-mindedness and small attitudes.

“The festival has been a bit of a mountain to climb and that can-do attitude that you need, the bugger-everyone-else attitude, are characteristics that Sid [Ambrose] has as well.

“He’s not put back by someone saying no. His immediate question is, why not? If the festival is a success then it is largely down to Sid’s quirky ideas and me saying, yes let’s give it a go when other people might say, no, I couldnae possibly do that – what would the neighbours think?”