More than 60 firefighters tackled a blaze in the roof at the historic Rattlebone Inn in Sherston, near Malmesbury, in the early hours of this morning.
The famous 17th century pub, frequented by Prince Harry and Prince William, has been badly damaged but the occupants escaped uninjured.
A fire service spokesman said firefighters were called to the pub at 2.28am and found that fire had broken out in the second floor roof space.
It is believed that the occupants were woken up by their smoke alarms and were able to leave the premises safely.
At the height of the blaze, there were ten fire engines in attendance from three counties, with crews from Malmesbury, Chippenham, Corsham, Stratton, Tetbury, Nailsworth and Yate.
An aerial appliance from Swindon and an incident command vehicle from Stratton were also sent to the scene.
By 8am, the main firefighting operation had been concluded and the attendance is now being scaled back to two fire engines and the aerial appliance.
An operational support unit from Swindon was sent to the scene at 9am to assist with making the building safe.
The main road through Sherston will remain closed until the last of the fire appliances have left and this is expected to be later this morning.
The spokesman said: "An investigation into what caused the fire will continue through the day but it is believed to have started accidentally."