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
Heneage Finch, 3rd Earl of Winchilsea from Ottoman territory in June 1668, King Charles II remarked to Finch, "My Lord, you have not only built a town, but peopled it too". Winchilsea, in an obvious reference to Charles' own brood of natural children, replied that after he was the King's representative. Lord Finch was appointed by his friend George Monck, 1st Duke of Albemarle a Governor of Dover Castle, and Lord Warden of the Cinque Ports in the July 1660, also Lord Lieutenant of Kent and afterwards ambassador to the Ottoman Empire and served in this capacity from between 1668 and 1672 Samuel Pepys first referred