A galley is a type of ship optimised for propulsion by oars. Galleys were historically used for warfare, trade, and piracy mostly in the seas surrounding Europe. It developed in the Mediterranean world during antiquity and continued to exist in various forms until the early 19th century. It typically had a long, slender hull, shallow draft, and often a low freeboard. Most types of galleys also had sails that could be used in favourable winds, but they relied primarily on oars to move independently of winds and currents or in battle. The term "galley" originated from a Greek term for a small type of galley and came in use in English from about 1300. It has occasionally been used for unrelated vessels with similar military functions as galley but which were not Mediterranean in origin, such as medieval Scandinavian longships, 16th-century Acehnese ghalis and 18th-century North American gunboats.
Galleys were the primary warships used by the ancient Mediterranean naval powers, including the Phoenicians, Greeks and Romans. The galley remained the dominant type of vessel used for war and piracy in the Mediterranean Sea until the start of the early modern period. A final revival of galley warfare occurred during the 18th century in the Baltic Sea during the wars between Russia, Sweden, and Denmark. In the Mediterranean, they remained in use until the very end of the 18th century, and survived in part because of their prestige and association with chivalry and land warfare. In war, galleys were used in landing raids, as troop transports and were very effective in amphibious warfare. While they usually served in wars or for defense against piracy, galleys also served as trade vessels for high-priority or expensive goods up to the end of the Middle Ages. Its oars guaranteed that it could make progress where a sailing ship would have been becalmed, and its large crew could defend it against attacks from pirates and raiders. This also made it one of the safest and most reliable forms of passenger transport, especially for Christian pilgrims during the High and Late Middle Ages.
For naval combat, galleys were equipped with various weapons: rams and occasionally catapults until late antiquity, Greek fire during the Early Middle Ages, and cannons from the 15th century. However, they relied primarily on their large crews to overpower enemy vessels through boarding. Galleys were the first vessels to effectively use heavy gunpowder artillery against other ships and naval fortifications. Early 16th-century galleys had heavy guns in the bow which were aimed by manoeuvring the entire vessel. Initially, gun galleys posed a serious threat to sailing warships, but were gradually made obsolete by the development of full-rigged ships with superior broadside armament. Galleys were unsuitable in the wider ocean, far from land and bases of resupply. They had difficulty in rough weather. Their role as flexible cruisers and patrol craft in the Mediterranean was also taken over by xebecs and other oar-sail hybrids.
Oars on ancient galleys were usually arranged in 15–30 pairs, from monoremes with a single line of oars to triremes with three lines of oars in a tiered arrangement. Occasionally, much larger polyremes had multiple rowers per oar and hundreds of rowers per galley. Ancient shipwrights built galleys using a labour-intensive, shell-first mortise and tenon technique up until the Early Middle Ages. It was gradually replaced by a less expensive skeleton-first carvel method. The rowing setup was also simplified and eventually developed into a system called alla sensile with up to three rowers sharing a single bench, handling one oar each. This was suitable for skilled, professional rowers. This was further simplified to the a scaloccio method with rowers sharing a bench but using just a single large oar, sometimes with up to seven or more rowers per oar in the very largest war galleys. This method was more suitable for the use of forced labour, both galley slaves and convicts. Most galleys were equipped with sails that could be used when the wind was favourable: basic square sails until the Early Middle Ages and later lateen sails.