Walmer Castle was built by Henry VIII in 1539–1540 as an artillery fortress to counter the threat of invasion from Catholic France and Spain. It was part of his programme to create a chain of coastal defences along England's coast known as the Device Forts or as Henrician Castles. It was one of three forts constructed to defend the Downs, an area of safe anchorage protected by the Goodwin Sands, in Kent, south east England. The other forts were at Deal and Sandown.
At the centre of Walmer Castle is a circular keep, surrounded by an open courtyard and protected by a concentric wall, from which four, squat, semi-circular bastions project. The northern bastion forms the gatehouse and would have had a gun on its roof; the other bastions would have had guns mounted inside them and on the roof. The central keep would also have had guns mounted on its roof giving the castle the capacity to mount 39 guns. A gallery running around the castle at basement level has 32 loops for hand-guns covering the moat.
The defences were never put to the test during the Tudor period and it wasn't until 1648, during the English Civil War, that the castle finally came under siege. The three 'castles of the Downs' were initially held for Parliament, but the forces switched allegiance to support the Royalist cause. It took Parliamentary forces, led by Colonel Rich, nearly three months to defeat the three castles, with Walmer surrendering first after a three week siege.