Aloophole is a protected small opening, which allows afirearm to be aimed and discharged, while providing cover and concealment for therifleman. To prevent detection, the rifle's muzzle should not protrude through the loophole, particularly at night to hide themuzzle flash.

The precursor to the loophole for firearms was thearrowslit, which is a narrow aperture in afortification for anarcher to launcharrows or anarbalist to launchcrossbow bolts. The earliest use of the arrowslit was alleged to have been byArchimedes during thesiege of Syracuse in 214–212 BC. Arrowslits were used inancient Greek warfare and by themilitary of ancient Rome. There was a reintroduction of arrowslits during themedieval warfare period atDover Castle andFramlingham Castle inEngland and byRichard the Lionheart atChâteau Gaillard inFrance.

During theFirst World War, the static movement oftrench warfare and a need for protection fromsnipers created a requirement for loopholes both for discharging firearms and for observation.[1] Often a steel plate was used with a "key hole", which had a rotating piece to cover the loophole when not in use.[1]
MajorHesketh Hesketh-Prichard of theCanadian Expeditionary Force and a trainer of snipers, wrote about the use of loopholes in his book,Sniping in France: Winning the Sniping War in the Trenches:
I am also keen on teaching our fellows to open loopholes sanely. I usually lie in front watching, and it is rarely that, if I shot straight, I should not be able to kill or wound nine of every ten men who open them. Loopholes should, of course, be opened from the side, and a cap badge exposed before they are looked through. If the German does not fire for 75 seconds, one may conclude that it is fairly safe. These little simple-sounding precautions can save so many lives.
— Major Hesketh Hesketh-Prichard[2]
Onecounter-sniper tactic to overcome steel plate loopholes was to wait for a sniper to open the key hole and then fire a large calibre firearm, such as ananti-materiel rifle, to penetrate through the steel plate and eliminate the sniper.[3]
Loopholes remain relevant in modernurban combat typically in walls – these may be already-existing holes, or purpose-made and fortified with sandbags or similar. Loopholes should be constructed in a seemingly random fashion at varying heights, and include a number of decoy holes in order to avoid drawing fire towards a single obvious hole.[4]