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 courts of Brodhull and Guestling were established to protect the privileges of the Cinque Ports by the portsmen themselves. From the 15th century these courts had been largely replaced by the Lord Warden's Court at Dover. From the 16th century the principal business of the courts was the installation of the Lord Warden and the court is now only occasionally summoned. The office continued to be a powerful one. In 1550 the Mayor and Jurats of Dover refused to accept a Royal Writ because it was not accompanied by a letter of attendance from the Lord Warden. The member ports'