No 166 Squadron RAF was originally formed at Bircham Newton, Norfolk on June 13, 1918, designed as a heavy bomber unit, to fly the Handley Page V/1500 aircraft. The squadron was never fully mobilized because the Armistice intervened. The squadron was re-formed in November 1936 as a heavy bomber unit, flying Handley Page Heyfords, later equipping with Armstrong Whitworth Whitleys. It was based at Boscombe Down, Wiltshire from November 1936 to January 1937, when it moved to Leconfield, Yorkshire. The squadron became part of an air observer's school on June 7, 1938, and then became a 1 Group pool squadron in May 1939. From September 1939 it was based at Abingdon, Berkshire until April 1940. In that month the squadron merged with no. 97 Squadron to form No. 10 OTU.
In January 1943 the squadron was re-formed at Kirmington, Yorkshire (53.578,-0.344, now Humberside Airport), from flights of Nos. 150 and 170 squadrons, when parts of these squadrons were posted to the Middle East. It was again bomber squadron, flying Vickers Wellingtons in No. 1 Group of Bomber Command. It remained at Kirmington until the end of WWII, later re-equipping with Avro Lancasters. In the period 27/28 January 1943 and 25 April 1945, it dropped 27,287 tons of bombs and laid 333 tons of mines. The squadron won "at least" 2 DSOs, 2 CGMs, 117 DFCs and 108 DFMs in the course of WWII. The squadron was disbanded on November 18, 1945.