The Boeing YB-40 Flying Fortress was a modification for operational testing purposes of the B-17 Flying Fortress bomber aircraft, converted to act as a heavily armed gunship to support other bombers during World War II. At the time of its development, long-range fighter aircraft such as the North American P-51 Mustang were just entering quantity production, and thus were not yet available to accompany bombers all the way from England to Germany and back. Design and development Work on the prototype, Project V-139, began in September 1942 by converting the second production B-17F-1-BO (serial number 41-24341) built. Conversion work was done by Lockheed's Vega company. The aircraft differed from the standard B-17 in that a second manned dorsal turret was installed in the former radio compartment, just behind the bomb bay and forward of the ventral ball turret's location. The single .50-caliber light-barrel (12.7 mm) Browning machine gun at each waist station was replaced by two of them mounted side by side as a twin-mount emplacement, with a mount for each pair of these being very much like the tail gun setup in general appearance. The bombardier's equipment was also replaced by two .50-caliber light-barrel Browning AN/M2 machine guns in a remotely operated Bendix designed "chin"-location turret, directly beneath the bombardier's location in the extreme nose. The existing "cheek" machine guns (on the sides of the forward fuselage at the bombardier station), initially removed from the configuration, were restored in England to provide a total of 16 guns, and the bomb bay was converted to an ammunition magazine. Additional armor plating was installed to protect crew positions. The aircraft's gross weight was some greater than a fully armed B-17. An indication of the burden this placed on the YB-40 is that while the B-17F on which it was based was rated to climb to in 25 minutes, the YB-40 was rated at 48 minutes. Part of the decreased performance was due to the weight increase, and part was due to the greater aerodynamic drag of the gun stations. The first flight of the XB-40 was on 10 November 1942. The first order of 13 YB-40s was made in October 1942. A follow-up order for 12 more was made in January 1943. The modifications were performed by Douglas Aircraft at their Tulsa, Oklahoma center, and the first aircraft were completed by the end of March 1943. Twenty service test aircraft were