Muzzle brake

A muzzle brake or recoil compensator is a device connected to, or a feature integral to the construction of, the muzzle or barrel of a firearm or cannon that is intended to redirect a portion of propellant gases to counter recoil and unwanted muzzle rise.[1] Barrels with an integral muzzle brake are often said to be ported.

The muzzle brake of the 105mm main gun on an AMX 10 RC armored car.
The muzzle brake of an M198 155mm howitzer venting propellant gases sideways as the howitzer is fired

The concept of a muzzle brake was first introduced for artillery. It was a common feature on many anti-tank guns, especially those mounted on tanks, in order to reduce the area needed to take up the strokes of recoil and kickback. They have been used in various forms for rifles and pistols to help control recoil and the rising of the barrel that normally occurs after firing. They are used on pistols for practical pistol competitions, and are usually called compensators in this context.[2]