A total of 5,288 were produced between February 1941 and March 1945; 522 of these were flown by the Royal Air Force and the South African Air Force. By the time the United States Air Force was created as an independent military service separate from the United States Army in 1947, all Martin B-26s had been retired from U.S. service. After the Marauder was retired the unrelated Douglas A-26 Invader then assumed the "B-26" designation which led to confusion between the two aircraft.