Wareham Castle and the town defences, known locally as the Walls, were fortifications in the town of Wareham in Dorset, England.
The site of the town of Wareham was probably occupied in the pre-Roman period and a Roman settlement was established there, taking advantage of its strategic location along the River Frome. It was taken by the Saxons in the late-6th century and, by the end of the 9th century, it had become one of the most important Anglo-Saxon burhs in Dorset. The burhs were defensive sites created by King Alfred and his son Edward to defend the borders of the kingdom of Wessex, although the work at Wareham may potentially have built on existing defences.The defences encompassed a rectangular area, up to 90 acres (36 ha) in size. It took the form of an earthwork bank with a protective ditch, topped by timber-faced ramparts, approximately 585 yards (535 m) long on the west side, 670 yards (610 m) along the north and 760 yards (690 m) on the eastern side - the length of the southern edge along the river are unknown. Four entrances to the town were built, one on each side. Probably at the end of the 10th century, or the beginning of the 11th century, the timber facings were replaced with stone. A system of taxes was established to support the burhs and in the Burghal Hidage record that survives from the reign of Edward shows that 1,600 hides - an area of land - were allocated for Wareham, sufficient to maintain 2,200 yards of ramparts.
Wareham Castle was built in the south-west corner of the old Anglo-Saxon earthworks, taking the form of a motte with an inner and outer bailey, protected with timber defences and a ditch. The original size of the motte is not known; 18th and 19th century records suggest it was between 55 and 60 feet (17–18 m) across. It is uncertain when the castle was built; it may have been constructed soon after the Norman conquest in 1066, although no physical evidence survives today to prove this theory. If the castle was built soon after 1066, the construction work may have required the extensive demolition of houses in that part of the town, and the decision to place it in the south-west sector may have been linked to the presence of a former Anglo-Saxon royal residence there.Robert Beaumont controlled the castle in 1188, when he passed it onto Robert, Earl of Gloucester, who carried out work on it in 1137. A small, square keep 37 feet (11 m) across with pilaster butressses at the corners, was built from stone rubble on the top of the motte, probably at the beginning of the 12th century. The bailey was protected by a stone curtain wall, known to have been 5 feet (1.5 m) thick in places. During the civil conflict known as the Anarchy in the 1140s, Wareham Castle lay on the border between the territories of the rival claimants for the throne, Stephen and the Empress Matilda, and the location of the regional mint. Robert was a supporter of Matilda, and the castle exchanged hands between him and Stephen several times in the next few years, with the town being possibly burnt by Stephen. By the end of the fighting, nearby Corfe Castle had taken over as the most important military fortification in the region.After 1154 and the end of the civil war, the castle was controlled by the earls of Gloucester. The town's economy stagnated during the late 12th and 13th centuries, although in 1207 the castle, which had been confiscated by King John, was repaired and used by the monarch as a stopping point on the way to Corfe Castle. After John, Wareham passed to the Earls of Clare, who paid it little attention, and the outer bailey ditch was filled in early in the 13th century. The river silted up and the port declined in importance, with trade focusing on Poole instead; by the 14th century, the town was in economic decline.
During the English Civil War of the 1640s, Wareham initially supported Parliament, and £60 was spent in 1642 improving the town walls. The Royalists, under Sir Ralph Hopton, took the town in 1643, but Parliament retook it in 1644, when soldiers led by Sir Ashley Cooper forced their way through the West Gate in the walls. The town wall was reinforced during the conflict, possibly with circular platforms positioned at key points. Parliament was advised that the defences remained useful and that they were too substantial to be slighted - deliberately damaged to put them beyond use. In 1685, seven men were executed for their part in the Monmouth Rebellion on the west bank of the defences, the section of which now carries the name of the "Bloody Bank".It is not known when the castle was finally abandoned, but by the 18th century, buildings were encroaching on the eastern edge of the castle site, with the remainder forming an open area, known as Castle Green. During the early 19th century, houses began to be built around the base of the motte, which was then enclosed in the late-19th century, with a villa called Castle Close was built on top of the motte in 1911. This required extensive changes to the shape of the motte, which is now 250 feet (76 m) in diameter, and 120 feet (37 m) across at the top. Most of the castle ditch was filled in, with the remaining elements 70 feet (21 m) across and 22 feet (6.7 m) deep. The foundations of the keep still survive within the motte, and the lines of the inner and outer bailey are traced by the Pound and Trinity lanes.It is not known when the stone from the Anglo-Saxon defences. Around 1850, a road was cut through part of the western town wall, and further alterations were made in 1940 during the Second World War to protect it against potential attacks by enemy tanks. In 1956, the town authorities took over management and conservation of the remaining walls. The Anglo-Saxon defences remain up to 55 feet (17 m) across and 17 feet (5.2 m) high in places, although the southern line along the river have been lost and only minimal parts of the eastern side remain; the south-eastern corner was destroyed at some point before the 18th century.Early investigations into the Anglo-Saxon defences were undertaken in 1910, 1930 and 1951, and more substantial excavations were carried out on the Anglo-Saxon defence between 1952 and 1954. The remains of the castle and the town defences are protected under UK law as a scheduled monument.