Operation Gambit was a part of Operation Neptune, the landing phase of the invasion of northern France (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.
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.
- Kemp 1996, pp. 170–172.