The M40 rifle is a used by the . It has had four variants—the M40, M40A1, M40A3, and M40A5. The M40 was introduced in 1966. The changeover to the A1 model was completed in the 1970s, the A3 in the 2000s, and the A5 in 2009.
Each M40 is built from a bolt-action rifle, and is modified by USMC armorers at , using components from a number of suppliers. New M40A5s are being built, and A1s are upgraded to A3s and A5s as they rotate into the armory for service and repair. The rifles have had many sub-variations in , and smaller user modifications. The M40A5 incorporates a detachable magazine and a threaded barrel to allow for the use of a or other muzzle device.