The Raid on the Medway, during the Second Anglo-Dutch War in June 1667, was a successful attack conducted by the Dutch navy on English warships laid up in the fleet anchorages off Chatham Dockyard and Gillingham in the county of Kent. At the time, the fortress of Upnor Castle and a barrier chain called the "Gillingham Line" were supposed to protect the English ships.
The Dutch, under nominal command of Willem Joseph van Ghent and Lieutenant-Admiral Michiel de Ruyter, over several days bombarded and captured the town of Sheerness, sailed up the Thames estuary to Gravesend, then sailed into the River Medway to Chatham and Gillingham, where they engaged fortifications with cannon fire, burned or captured three capital ships and ten more ships of the line, and captured and towed away the flagship of the English fleet, HMS Royal Charles.
Politically, the raid was disastrous for King Charles' war plans and led to a quick end to the war and a favourable peace for the Dutch. It was one of the worst defeats in the Royal Navy's history, and one of the worst suffered by the British military. Horace George Franks called it the "most serious defeat it has ever had in its home waters."