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
Deal Castle of Dorset, Lionel Sackville and there may have been some competition between the two men. The keep was redesigned with medieval-style battlements and wood-panelled accommodation at the rear overlooking the sea; the porter's lodge was also updated. During the Napoleonic Wars, the castle was armed with nine 36-pounder guns, supported by further artillery batteries placed along the beach. To protect Deal, units of infantry and cavalry, called fencibles, were formed in 1794 by William Pitt the Younger – then both the Prime Minister and the Lord Warden of the Cinque Ports – and in 1802 units of bombardiers recruited by