Operation Gambit was a part of Operation Neptune, the landing phase of the invasion of northern France (Operation Overlord) during the Second World War. Gambit involved two X class submarines (British midget submarines) marking the ends of the Anglo-Canadian invasion beaches. Using navigation lights and flags, the submarines indicated the western and eastern limits of Sword and Juno Beaches. X20 and X23 arrived in position on 4 June and due to the delay caused by bad weather, remained in position until 4:30 a.m. on 6 June (D-Day) when they surfaced, erected the navigational aids, an 18 ft (5.5 m) telescopic mast with a light shining to seaward, a radio beacon and echo sounder, tapping out a message for the minelayers approaching Sword and Juno.
A similar operation had been offered to the US landing forces to mark their beaches but this was declined. The team of Captain Logan Scott-Bowden and Sergeant Bruce Ogden-Smith did investigate Omaha Beach for General Omar Bradley, returning with a sand sample.[1] The submarines were at some risk of damage due to friendly fire and to avoid this, Lieutenant George Honour the captain of X23 flew a White Ensign of the size more normally used by capital ships.[2]