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 the development of the Royal Navy. King Edward I of England granted the citizens of the Cinque Ports special privileges, including the right to bring goods into the country without paying import duties; in return the Ports would supply him with men and ships in time of war (as in the Welsh campaign of 1282). The associated ports, known as "limbs", were given the same privileges. The five head ports and two ancient towns were entitled to send two Members to Parliament. A Lord Warden of the Cinque Ports was appointed, and also held the title of Constable of Dover