Walmer Castle against Charles' brother, King James II, the townsfolk of Deal seized Walmer Castle on behalf of William III, the Prince of Orange. By the end of the century, however, the castle was increasingly regarded as out of date from a military perspective. In the 18th century, Walmer Castle became the official residence of the Lord Warden of the Cinque Ports. The Lord Warden was originally a medieval title linked to five key ports along the coast of England; the position's prominence had faded, but it still retained important judicial and military functions. When Lionel Sackville, the Duke of Dorset, was
Cinque Ports 'limbs'. The five ports are supported by the two so-called Ancient Towns of Rye and Winchelsea, whose councils traditionally maintained defence contingents for the realm of England. Apart from the five ports and the two Ancient Towns, there are seven other members of the Confederation, which are considered to be Limbs of the other towns. These are: There are in addition some 23 towns, villages and offices which have varying degrees of connection to the ancient "Liberties of the Cinque Ports", which are expressly mentioned in the Magna Carta of 1297 (clause 9). The coastal confederation during its mediaeval period