During World War II, Operation Gambit was a part of Operation Neptune, the landing phase of the invasion of northern France (Overlord). Gambit involved two X class submarines (British midget submarines) which marked with navigation lights and flags the extreme west and east limits of Sword Beach and Juno Beach, the easternmost British and Canadian invasion 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-foot 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' beaches.
A similar operation had been offered to the US landing forces to mark their beaches, but this was declined.
- Kemp 1996, pp. 170–172.