A rifle is a firearm designed to be fired from the shoulder, with a barrel that has a helical groove or pattern of grooves ("rifling") cut into the barrel walls. The raised areas of the rifling grooves are called "lands," which make contact with the projectile (for small arms usage, called a bullet), imparting spin around an axis corresponding to the orientation of the weapon. When the projectile leaves the barrel, the conservation of angular momentum improves accuracy and range, in the same way that a properly thrown American football or rugby ball behaves. The word "rifle" originally referred to the grooving, and a rifle was called a "rifled gun." Rifles are used in warfare, hunting and shooting sports.
Typically, a bullet is propelled by the contained deflagration of an explosive compound (originally black powder, later cordite, and now nitrocellulose), although other means such as compressed air are used in air rifles, which are popular for vermin control, hunting small game, and casual shooting ("plinking").
In many armed forces units it is thought wrong to use the word "gun" to mean a rifle. Furthermore, in many works of fiction a rifle refers to any weapon that has a stock and is shouldered before firing, even if this weapon is not rifled or doesn't fire solid projectiles.
Originally, rifles were sharpshooter weapons, while the regular infantry made use of the greater firepower of massed muskets, which fired round musket balls of calibers up to 19 mm (0.75 inch). Benjamin Robins, an English mathematician, realized that an elongated bullet would retain the mass and kinetic force of a musket ball, but would slice through the air with much greater ease. The innovative work of Robins and others would take until the end of the 18th century to gain acceptance.
By the mid-19th century, however, manufacturing had advanced sufficiently that the musket was replaced by a range of rifles—generally single-shot, breech-loading—designed for aimed, discretionary fire by individual soldiers. Then, as now, rifles had a stock, either fixed or folding, to be braced against the shoulder when firing. Early military rifles, such as the Baker rifle were shorter than the day's muskets, and usually the weapon of a marksman. Until the early 20th century rifles tended to be very long—an 1890 Martini-Henry was almost 2 m (6 ft) in length with a fixed bayonet. The demand for more compact weapons for cavalrymen led to the carbine, or shortened rifle.
Muskets were smoothbore, large caliber weapons using ball-shaped ammunition fired at relatively low velocity. Due to the high cost and great difficulty of precision manufacturing, and the need to load readily from the muzzle, the musket ball was a loose fit in the barrel. Consequently on firing the ball bounced off the sides of the barrel when fired and the final direction on leaving the muzzle was unpredictable.
The performance of early muskets was sufficient for the styles of warfare at the time, whereby soldiers tended to stand in long, stationary lines and fire at the opposing forces. Aiming and accuracy were not necessary to hit an opponent.
The origins of rifling are difficult to trace, but some of the earliest practical experiments seem to have occurred in Europe during the fifteenth century. Archers had long realized that a twist added to the tail feathers of their arrows gave them greater accuracy. Early muskets produced large quantities of smoke and soot, which had to be cleaned from the action and bore of the musket frequently; either the action of repeated bore scrubbing, or a deliberate attempt to create "soot grooves" might also have led to a perceived increase in accuracy, although no-one knows for sure. True rifling dates from the mid-15th century, although the precision required for its effective manufacture kept it out of the hands of infantrymen for another three and a half centuries, when it largely replaced the unrifled musket as the primary infantry weapon. In the transitional nineteenth century, the term "rifled musket" was used to indicate the novel weapon. During the Napoleonic Wars the British army created several experimental units known as "Rifles", armed with the Baker rifle. These Rifle Regiments were deployed as skirmishers during the Peninsular war in Spain and Portugal, and were more effective than skirmishers armed with muskets due to their accuracy and long range. There is also an historic account of Rifleman Thomas Plunkett of the 1st Battalion 95th Rifles shooting General Colbert at a range of between 400 m 600 m (400 to 600 yards) during this campaign.
 First designs
Some early rifled guns were created with special barrels that had a twisted polygonal shape. Specially-made bullets were designed to match the shape so the bullet would grip the rifle bore and take a spin that way. These were generally limited to large caliber weapons and the ammunition still did not fit tightly in the barrel. Many experimental designs used different shapes and degrees of spiraling. Although uncommon, polygonal rifling is still used in some weapons today with one example being the Glock line of pistols (which fire standard bullets). Unfortunately, many early attempts resulted in dangerous backfiring, which could lead to destruction of the weapon and serious injury to the person firing.
 19th century
Gradually, rifles appeared with cylindrical barrels cut with helical grooves, the surfaces between the grooves being called "lands". The innovation shortly preceded the mass adoption of breech-loading weapons, as it was not practical to push an overbore bullet down through a rifled barrel, only to then (try to) fire it back out. The dirt and grime from prior shots was pushed down ahead of a tight bullet or ball (which may have been a loose fit in the clean barrel before the first shot), and, of course, loading was far more difficult, as the lead had to be deformed to go down in the first place, reducing the accuracy due to deformation. Several systems were tried to deal with the problem, usually by resorting to an under-bore bullet that expanded upon firing.
The original muzzle-loading rifle, with a closely fitting ball to take the rifling grooves, was loaded with difficulty, particularly when foul, and for this reason was not generally used for military purposes. Even with the advent of rifling the bullet itself didn't change, but was wrapped in a greased, cloth patch to grip the rifling grooves.
The first half of the nineteenth century saw a distinct change in the shape and function of the bullet. In 1826 Delirque, a French infantry officer, invented a breech with abrupt shoulders on which a spherical bullet was rammed down until it caught the rifling grooves. Delirque's method, however, deformed the bullet and was inaccurate.
One of the most famous was the Minié system, which relied on a conical bullet (known as a Minié ball) with a hollow at the base of the bullet that caused the base of the round to expand from the pressure of the exploding charge and grip the rifling as the round was fired. Minié system rifles, notably the U.S. Springfield and the British Enfield of the early 1860s, featured prominently in the U.S. Civil War, due to the enhanced power and accuracy. The better seal gave more power, as less gas escaped past the bullet, which combined with the fact that for the same bore (caliber) diameter a long bullet was heavier than a round ball. Enhanced accuracy came from the expansion to grip the rifling, which spun the bullet more consistently.
Another important area of development was the way that cartridges were stored and used in the weapon. The Spencer repeating rifle was a breech-loading manually operated lever action rifle, that was adopted by the United States. Over 20,000 were used during the Civil War. It marked the first adoption of a removable magazine-fed infantry rifle by any country. The design was completed by Christopher Spencer in 1860. It used copper rimfire cartridges stored in a removable seven round tube magazine, enabling the rounds to be fired one after another. When the magazine was empty, it could be exchanged for another.
As the bullet enters the barrel, it inserts itself into the rifling, a process that gradually wears down the barrel, and also causes the barrel to heat up more rapidly. Therefore, some machine-guns are equipped with quick-change barrels that can be swapped every few thousand rounds, or in earlier designs, were water-cooled. Unlike older carbon steel barrels, which were limited to around 1,000 shots before the extreme heat caused accuracy to fade, modern stainless steel barrels for target rifles are much more resistant to wear, allowing many thousands of rounds to be fired before accuracy drops. (Many shotguns and small arms have chrome-lined barrels to reduce wear and enhance corrosion resistance. This is rare on rifles designed for extreme accuracy, as the plating process is difficult and liable to reduce the effect of the rifling.) Modern ammunition has hardened leadcore with a softer outer cladding or jacket, typically of an alloy of copper and nickel - cupro-nickel. Some ammunition is even coated with molybdenum-disulfide to further reduce internal friction - the so-called 'moly-coated' bullet.
 Bullet design
Over the 19th century, bullet design also evolved, the bullets becoming gradually smaller and lighter. By 1910 the standard blunt-nosed bullet had been replaced with the pointed, 'spitzer' bullet, an innovation that increased range and penetration. Cartridge design evolved from simple paper tubes containing black powder and shot, to sealed brass cases with integral primers for ignition, while black powder itself was replaced with cordite, and then other nitro-cellulose-based smokeless powder mixtures, propelling bullets to higher velocities than before.
The increased velocity meant that new problems arrived, and so bullets went from being soft lead to harder lead, then to copper jacketed, in order to better engage the spiraled grooves without "stripping" them in the same way that a screw or bolt thread would be stripped if subjected to extreme forces.
 20th century
As mentioned above, rifles were initially single-shot, muzzle-loading weapons. During the 18th century, breech-loading weapons were designed, which allowed the rifleman to reload while under cover, but defects in manufacturing and the difficulty in forming a reliable gas-tight seal prevented widespread adoption. During the 19th century, multi-shot repeating rifles using lever, pump or linear bolt actions became standard, further increasing the rate of fire and minimizing the fuss involved in loading a firearm. The problem of proper seal creation had been solved with the use of brass cartridge cases, which expanded in an elastic fashion at the point of firing and effectively sealed the breech while the pressure remained high, then relaxed back enough to allow for easy removal. By the end of the 19th century, the leading bolt-action design was that of Paul Mauser, whose action—wedded to a reliable design possessing a five-shot magazine—became a world standard through two world wars and beyond. The Mauser rifle was paralleled by Britain's ten-shot Lee-Enfield and America's 1903 Springfield Rifle models (the latter pictured above). The American M1903 closely copied Mauser's original design.
The advent of massed, rapid firepower and of the machine gun and the rifled artillery piece was so quick as to outstrip the development of any way to attack a trench defended by riflemen and machine gunners. The carnage of World War I was perhaps the greatest vindication and vilification of the rifle as a military weapon. By World War II, military thought was turning elsewhere, towards more compact weapons.
Experience in World War I led German military researchers to conclude that long-range aimed fire was less significant at typical battle ranges of 300 m. As mechanisms became smaller, lighter and more reliable, semi-automatic rifles, including the M1 Garand, appeared. World War II saw the first mass-fielding of such rifles, which culminated in the Sturmgewehr 44, the first assault rifle and one of the most significant developments of 20th century small-arms.
By contrast, civilian rifle design has not significantly advanced since the early part of the 20th century. Modern hunting rifles have fiberglass and carbon fiber stocks and more advanced recoil pads, but are fundamentally the same as infantry rifles from 1910. Many modern sniper rifles can trace their ancestry back for well over a century, and the Russian 7.62 x 54 mm cartridge, as used in the front-line Dragunov Sniper Rifle (SVD), dates from 1891.
 History of use
Muskets were used for comparatively rapid, unaimed volley fire, and the average conscripted soldier could be easily trained to use them. The (muzzle-loaded) rifle was originally a sharpshooter's weapon used for targets of opportunity and deliberate aimed fire. During the Napoleonic Wars, the British 95th Regiment (Green Jackets) and 60th Regiment (Royal American) used the rifle to great effect during skirmishing. Because of a slower loading time than a musket, they were not adopted by the whole army. The adoption of cartridges and breech-loading in the 19th century was concurrent with the general adoption of rifles. In the early part of the 20th century, soldiers were trained to shoot accurately over long ranges with high-powered cartridges. World War I Lee-Enfields rifles (among others) were equipped with long-range 'volley sights' for massed firing at ranges of up to 1.6 km (1.0 mile). Individual shots were unlikely to hit, but a platoon firing repeatedly could produce a 'beaten ground' effect similar to light artillery or machine guns; but experience in WWI showed that long-range fire was best left to the machine gun.
During and after WWII it became accepted that most infantry engagements occur at ranges of less than 300 m; the range and power of the large rifles was "overkill"; and the weapons were heavier than the ideal. This led to Germany's development of the 7.92 x 33 mm Kurz (short) round, the Karabiner 98, the MKb-42, and ultimately, the assault rifle. Today, an infantryman's rifle is optimised for ranges of 300 m or less, and soldiers are trained to deliver individual rounds or bursts of fire within these distances. The application of accurate, long-range fire is the domain of the sniper in warfare, and of enthusiastic target shooters in peacetime. The modern sniper rifle is usually capable of accuracy better than 0.3 mrad (1 arcminute).
In recent decades, large-caliber anti-materiel rifles, typically firing 12.7 mm and 20 mm caliber cartridges, have been developed. The US Barrett M82A1 is probably the best-known such rifle. These weapons are typically used to strike critical, vulnerable targets such as computerized command and control vehicles, radio trucks, radar antennae, vehicle engine blocks and the jet engines of enemy aircraft. Anti-materiel rifles can be used against human targets, but the much higher weight of rifle and ammunition, and the massive recoil and muzzle blast, usually make them less than practical for such use. The Barrett M82 is credited with a maximum effective range of 1800 m (1.1 mile); and it was with a .50BMG caliber McMillan TAC-50 rifle that Canadian Master Corporal Rob Furlong made the longest recorded confirmed sniper kill in history, when he shot a Taliban insurgent at a range of 2,430 meters (1.51 miles) in Afghanistan during Operation Anaconda in 2002.
 Modern civilian useshotguns are favored). Use in competition is also very common, and includes Olympic events. Military-style rifles in semi-automatic such as the AR-15 have become very popular in the United States and are now used for hunting all sizes of game since a selection of different calibers have become available.
 See also
 Kinds of rifles
- "The How and Why of Long Shots and Straight Shots" (April 1860). Cornhill Magazine.
- Rifled Breach Loader Globalsecurity.org
- Friscolanti, Michael (2006-05-15). "We were abandoned". Maclean's: p18-25. Rogers Publishing.