The manager of the Rattlebone Inn, at Sherston, could well have died if smoke detectors had not sounded, Wiltshire Fire and Rescue service said today.

Fire crews fought back flames that have devastated much of the roof and second floor of the 17th century pub, near Malmesbury.

Gavin Hunt, the manager, was woken by smoke alarms in the early hours of the morning and escaped unharmed.

Landlord Jason Read, who lives nearby, rushed down to the Youngs-owned pub, once famous for being a regular haunt for Prince Harry, at 3.30am after receiving a call from his manager.

He said: “We just have to get the loss adjusters in and the structural engineers to get an idea of what the damage is and go from there really.”

Wiltshire Fire and Rescue Service were called to the pub at 2.28am by neighbours who reported seeing large flames billowing out the back of the Grade II-listed building.

Today a spokesman said: "The manager, who was woken up by smoke detectors, was able to raise the alarm quickly and also leave the building safely and without injury."

The service said that he could well have died, had smoke alarms not sounded.

At the height of the blaze there were ten fire engines on the scene, from Malmesbury, Chippenham, Corsham, Stratton, Tetbury, Nailsworth and Yate.

One neighbour, who asked to remain anonymous, said: “My neighbour called to tell me at about 3.30am/4am.

“There were flames everywhere; you could see them from my window.”

The closure of the village’s only open pub, which is a popular stopping point during the Badminton Horse Trials in May, has come as a big blow to the local community.

“We are going to be a bit stuck now, to put it mildly,” said parish councillor Martin Rea.

“I don’t quite know how the village will cope without its pub.

“I’m just thankful that Gavin got out quickly and wasn’t injured.

“We just have to think of the staff and Jason because this is his livelihood.

“Only recently it was full of primary school children eating pancakes so it’s very important to all of us in the village.

“Jason said repairs will take weeks.

“The pub is always absolutely packed during Badminton (horse trials) and with the road having been closed in to the village businesses have had a bit of a nightmare so Badminton is badly needed.”

The pub hosts the Boules league which is due to begin again in April and Badminton takes place during the first weekend in May.

Hannah Allan, owner of Apples and Pairs children’s wear shop nearby, said: “It’s really tough for Jason but thankfully no one was hurt.

“Buildings can be mended but it’s just a relief nobody has been injured.”

The fire service believes the fire started accidently, probably due to some sort of electrical fault.

At 1.30pm, the aerial appliance, an operational support unit and one fire crew remained at the scene, assisting with salvage and making the building watertight.

The road through Sherston reopened this afternoon when firefighters left the scene.

Fire investigation officer Kathy Collis has said that initial investigations seem to show that electrical wiring above a door on the first floor is the likely cause of the fire.

She found about 25 per cent damage to the roof tiles and timber, and about 50 per cent damage to the first floor flat, including damage to the door which provides an exit route from the flat, highlighting how manager Gavin Hunt was lucky to escape unharmed.