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
Lord Warden of the Cinque Ports coming from west to east. A unique uniform is specified for the Lord Warden (though the present incumbent wears his naval uniform in preference). The uniform is very similar to a pre-1956-pattern Admiral's uniform (complete with cocked hat) trimmed in red and with Cinque Ports insignia. Sir Robert Menzies's uniform (pictured), which he wore as Lord Warden from 1966 to 1978, is preserved at the National Library of Australia. All Freemen of the Ports, termed "Portsmen", were deemed in the age of Feudalism to be barons, and thus members of the baronage entitled to attend the king's parliament. Termed "Barons