The term swivel gun usually refers to a small cannon, mounted on a swiveling stand or fork which allows a very wide arc of movement. Another type of firearm referred to as a swivel gun was an early flintlock combination gun with two barrels that rotated along their axes to allow the shooter to switch between rifled and smoothbore barrels.
An older term for the type is peterero (alternative spellings include "paterero" and "pederero"). The name was taken from the Spanish name for the gun, pedrero, a combination of the word piedra (stone) and the suffic -ero (-er), because stone was the first type of ammunition fired.
Swivel guns are among the smallest types of cannon, typically measuring less than 1 m (3.3 ft) in length and with a bore diameter of up to 3.5 cm (1 1⁄2 in). They can fire a variety of ammunition but were generally used to fire grapeshot and small caliber round shot. They were aimed through the use of a wooden handle, somewhat similar in shape to a baseball bat, attached to the breech of the weapon.
Most swivel guns were muzzleloaders, but there were some breech-loading swivel guns as early as the 16th century, making them among the first such examples of this type of weapon. Breech-loading swivel guns had a breech shaped like a beer mug, which the gunner would take by the handle and insert into the body of the swivel gun with the breech's opening facing forwards. The gunpowder and projectiles were loaded into the breech before it was inserted into the gun. If a number of breeches were prepared beforehand, the gunner could maintain a high rate of fire for a brief period simply by swapping out the used breech and replacing it with a freshly loaded one.
Swivel guns were used principally aboard sailing ships, serving as short-range anti-personnel ordnance. They were not ship-sinking weapons, due to their small caliber and short range, but could do considerable damage to anyone caught in their line of fire. They were especially useful against deck-to-deck boarders, against approaching longboats bearing boarding parties, and against deck gun crews when ships were hull-to-hull.
Due to their relatively small size, swivel guns were highly portable and could be moved around the deck of a ship quite easily (and certainly much more easily than other types of cannon). They could be mounted on vertical timbers (pillars) which were either part of the ship's structure or were firmly bolted to that structure along either side, which provided the gunner with a reasonably steady platform from which to fire. Their portability enabled them to be installed wherever they were most needed; whereas larger cannon were useless if they were on the wrong side of the ship, swivel guns could be carried across the deck to face the enemy.
The small size of swivel guns enabled them to be used by a wide variety of vessels, including those too small to accommodate larger cannons, and also permitted their use on land; they were commonly issued to forts in North America in the 18th century, and Lewis and Clark took one with them on their famous expedition into the American interior in 1804. Swivel guns also had peaceful uses. They were used for signalling purposes and for firing salutes, and also found uses in whaling, where bow-mounted swivel guns were used to fire harpoons, and fowling, where swivel guns mounted on punts were used to shoot flocks of waterfowl (see also punt gun).
Swivel guns were extensively used by the kingdoms and empires of Asia, particularly China and Korea. The first Chinese swivel guns were cast as early as 1520 after being introduced from Europe, and Korea followed suit by the 1560s. During the Japanese invasions of Korea (1592–1598), Korean naval forces used swivel guns and larger cannon to great effect in interdicting the invading Japanese forces.