A gunboat is a naval watercraft designed for the express purpose of carrying one or more guns to bombard coastal targets, as opposed to those military craft designed for naval warfare, or for ferrying troops or supplies.
In the age of sail, a gunboat was usually a small undecked vessel carrying a single smoothbore cannon in the bow, or just two or three such cannons. A gunboat could carry one or two masts or be oar-powered only, but the single-masted version of about 15 m (49 ft) length was most typical. Some types of gunboat carried two cannons, or else mounted a number of swivel guns on the railings.
The small gunboat had advantages: if it only carried a single cannon, the boat could manoeuvre in shallow or restricted areas - such as rivers or lakes - where larger ships could sail only with difficulty. The gun that such boats carried could be quite heavy; a 32-pounder for instance. As such boats were cheap and quick to build, naval forces favoured swarm tactics: while a single hit from a frigate's broadside would destroy a gunboat, a frigate facing a large squadron of gunboats could suffer serious damage before it could manage to sink them all. For example: in the Battle of Alvøen (1808) during the Gunboat War of 1807-1814, five Dano-Norwegian gunboats defeated the lone frigate HMS Tartar. Gunboats used in the Battle of Valcour Island (1776) on Lake Champlain during the American Revolutionary War were mostly built on the spot, attesting to the speed of their construction.
All navies of the sailing era kept a number of gunboats on hand. Gunboats saw extensive use in the Baltic Sea during the late 18th century as they were well-suited for the extensive coastal skerries and archipelagoes of Sweden, Finland and Russia. The rivalry between Sweden and Russia in particular led to an intense expansion of gunboat fleets and the development of new gunboat types. The two countries clashed during the Russo-Swedish war of 1788–90, a conflict that culminated in the massive Battle of Svensksund in 1790, in which over 30,000 men and hundreds of gunboats, galleys and other oared craft took part. The majority of these were vessels developed from the 1770s and onwards by the naval architect Fredrik Henrik af Chapman for the Swedish archipelago fleet. The designs, copied and refined by the rival Danish and Russian navies, spread to the Mediterranean and to the Black Sea.