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 Fortress Royal Engineers and signal companies of the Home Counties Division and a group of 'Kent and Sussex Fortress Companies'. These became the Sussex Fortress Royal Engineers based at Seaford, East Sussex, the Kent Fortress Royal Engineers based at Gillingham, and a company at Dover entitled the Cinque Ports Fortress Royal Engineers by 1910. At the outbreak of World War I the unit consisted of a single Electric Lights Company based at 16 Bench Street, Dover, forming part of South East Coastal Defences. With the expansion of the army the Cinque Ports company contributed personnel to the 1/6th and 1/7th Kent Fortress Companies