Wells St Andrew, or St Andrew Liberty, or derivations thereof, was a liberty, ecclesiastical parish, and later a civil parish, containing Wells Cathedral (which is dedicated to Saint Andrew) and surrounding land, in Somerset, England.
Bishop Jocelin established the area as a liberty, so as to be free from civil jurisdiction, in 1207. The liberty was founded to provide housing for the canons of the cathedral, who were secular clergy.
The Liberty encompassed 52 acres (21 ha) broadly situated to the east of the city centre of Wells. The main part of the Liberty formed a walled precinct within the city (which was otherwise not walled) and this included Wells Cathedral, the Cathedral Green, the Bishop's Palace, the Old Deanery, and Vicars' Close.
The Bishop's Palace was already surrounded by walls, but in 1286 Bishop Burnell obtained a licence to crenellate, so as to build gated walls around the wider cathedral close and adjacent residential complex of canons; this licence was repeated in 1340 for Bishop Ralph of Shrewsbury. The building of the walls is believed to have filled a number of roles, including defending the ecclesiastical territory in a time of hostilities between religious and civic authorities, displaying the authority of the Bishop of Bath and Wells, and possibly also in part as an element in the landscaping of the cathedral close and palace.
Access to this walled area was controlled by a number of gatehouses and other gateways; many of these buildings still exist: the Bishop's Eye, Brown's Gatehouse, the Chain Gate, the Penniless Porch (all four constructed under Bishop Beckington, c. 1450-60) and the gateways at both ends of Vicars' Close. Much of the walls remain extant too, though in places have been reduced in height or have purposeful gaps. In places buildings formed the walled perimeter, especially facing the city centre; a notable gap in this built-up perimeter now exists opposite the Swan Hotel on Saddler Street, which allows for the hotel a direct view of the cathedral and a terrace by the Cathedral Green.