The M40 recoilless rifle is a lightweight, portable, crew-served 106 mm weapon intended primarily as an anti-tank weapon made in the United States. The weapon is commonly described as being 106 mm, but it is in fact 105 mm; the 106 mm designation was designed to prevent confusion with the incompatible 105 mm ammunition from the failed M27. It could also be employed in an antipersonnel role with the use of the antipersonnel-tracer flechette round. It can be fired primarily from a wheeled ground mount. The air-cooled, breech-loaded, single-shot rifle fired fixed ammunition. It was designed for direct firing only, and sighting equipment for this purpose was furnished with each weapon.
The M27 recoilless rifle was a 105-mm weapon developed in the early 1950s and fielded in the Korean War. Although a recoilless rifle of this caliber had been a concept since the Second World War, the weapon was hurriedly produced with the onset of the Korean War. The speed with which it was developed and fielded resulted in problems with reliability caused by trunnions that were mounted too far to the rear. The M27 was also considered too heavy by the U.S. Army and had a disappointing effective range due to the lack of a spotting rifle. Taking the M27 as the basis for a new design, the Army developed an improved version of the M27 that was in 1955 type-designated the M40 106-mm recoilless rifle. Originally along with its type-designation it was also given the official name BAT for Battalion Anti-Tank gun, but that was soon dropped. Although unsuitable for military purposes, M27 recoilless rifles were used to trigger controlled avalanches at ski resorts and mountain passes in the United States.
The M40 primarily saw action during the Vietnam War and was later replaced by the BGM-71 TOW anti-tank missile system. The weapon was also used by anti-communist forces in Angola mounted on Land Rovers.