In the 18th century and most of the 19th, a sloop-of-war in the Royal Navy was a warship with a single gun deck that carried up to eighteen guns. The rating system covered all vessels with 20 guns and above; thus, the term sloop-of-war encompassed all the unrated combat vessels, including the very small gun-brigs and cutters. In technical terms, even the more specialised bomb vessels and fireships were classed as sloops-of-war, and in practice these were employed in the sloop role when not carrying out their specialised functions. In World War I and World War II, the Royal Navy reused the term "sloop" for specialised convoy-defence vessels, including the of World War I and the highly successful of World War II, with anti-aircraft and anti-submarine capability. They performed similar duties to the American destroyer escort class ships, and also performed similar duties to the smaller corvettes of the Royal Navy. Rigging A sloop-of-war was quite different from a civilian or mercantile sloop, which was a general term for a single-masted vessel rigged in a way that would today be called a gaff cutter (but usually without the square topsails then carried by cutter-rigged vessels), though some sloops of that type did serve in the 18th century British Royal Navy, particularly on the Great Lakes of North America. In the first half of the 18th century, most naval sloops were two-masted vessels, usually carrying a ketch or a snow rig. A ketch had main and mizzen masts but no foremast. A snow had a foremast and a main mast immediately abaft which a small subsidiary mast was fastened on which the spanker was set. Ship sloop The first three-masted, i.e., "ship rigged", sloops appeared during the 1740s, and from the mid-1750s most new sloops were built with a three-masted (ship) rig. The third mast afforded the sloop greater mobility and the ability to back sail. Brig sloop In the 1770s, the two-masted sloop re-appeared in a new guise as the brig sloop, the successor to the former snow sloops. Brig sloops had two masts, while ship sloops continued to have three (since a brig is a two-masted, square-rigged vessel, and a ship is a square-rigger with three or more masts, though never more than three in that period). In the Napoleonic period, Britain built huge numbers of brig sloops of the (18 guns) and the (10 guns). The brig rig