A remarkable remnant from the huge wall of defences that once surrounded Malmesbury has been uncovered by archaeologists after building work on a 19th-century house.

Experts have been excited and surprised by the discovery of what they believe is a postern gate built by the Royalist defenders of the former walled city during the Civil War more than 350 years ago.

A postern gate was a secret entrance created in walled fortifications that enabled citizens or defenders to come and go without being seen by an enemy camped outside.

According to a 1648 image of the town, its walled fortifications, which continually evolved over more than 2,000 years, had three such gates but until now there had been no evidence of this particular one.

It came to light last summer when builders were working in the basement of a house built in 1823 at King’s Wall, which is located close to the line of Malmesbury’s medieval defences.

Workmen called experts from Wiltshire’s archaeology team and the Wiltshire Buildings Record after hitting a void below a 20th-century concrete kitchen floor.

They found a small square room with a vaulted stone ceiling, along with the remnants of an archway that had been partially filled in over the centuries with rubble and earth.

Their brief investigation before the building work continued has led them to believe the structure was a submerged postern gate built into the ancient walls by the town’s defenders during the Civil War.

Dorothy Treasure, principal buildings historian at the Chippenham-based Wiltshire Buildings Record, has published a report on the find.

She said: “There was a significant amount of defence work built onto the medieval wall during the Civil War.”

She said the structure they uncovered had been built against a bastion of the old wall that had been there for about 1,000 years.

She said: “Because it is so small, and the arch was so low, it suggests that it might have been a postern gate at the base of a tower.

“It was a very exciting discovery. These things don’t happen very often. The builders were just as excited about it as we were.”

High stone walls were originally built around the settlement that became Malmesbury as far back as 500BC.

These were maintained and re-built for centuries before being replaced by a 12th-century town wall which was then heavily fortified during the Civil War in the 17th century.

The town changed hands several times during the war before the victorious Parliamentarians in 1646 ordered the wall to be destroyed – only remnants of it remain today.