The squadron was constituted on 19 June 1942 during World War II as the 438th Bombardment Squadron (Medium), and was activated on 26 June at Barksdale Field, assigned to the 319th Bombardment Group, equipped with the Martin B-26 Marauder medium bomber. After training with the group under the Third Air Force in Louisiana, it was sent to the Mediterranean Theater of Operations through England, where it was based between September and October. The ground echelon of the squadron landed at Arzew, Algeria during Operation Torch, the Allied invasion of North Africa, on 8 November. In Algeria, the group became part of the Twelfth Air Force; the squadron was based at Saint-Leu Airfield around 10 November, moving to Tafaraoui Airfield on 17 November, Maison Blanche Airport around 26 November, and Telergma Airport on 13 December. It flew its first combat mission of the North African Campaign on 28 November, engaging in raids on Axis airdromes, harbors, railroads, and shipping off the North African coast among other targets until 13 February 1943.