A ship of the line was a type of naval warship constructed from the 17th through to the mid-19th century to take part in the naval tactic known as the line of battle, in which two columns of opposing warships would manoeuvre to bring the greatest weight of broadside firepower to bear. Since these engagements were almost invariably won by the heaviest ships carrying the most powerful guns, the natural progression was to build sailing vessels that were the largest and most powerful of their time.
From the end of the 1840s, the introduction of steam power brought less dependence on the wind in battle and led to the construction of screw-driven, wooden-hulled, ships of the line; a number of pure sail-driven ships were converted to this propulsion mechanism. However, the introduction of the ironclad frigate in about 1859 led swiftly to the decline of the steam-assisted ships of the line. The ironclad warship became the ancestor of the 20th-century battleship, whose very designation is itself a contraction of the phrase "ship of the line of battle" or, more colloquially, "line-of-battle ship".
The term "ship of the line" has fallen into disuse except in historical contexts, after warships and naval tactics evolved and changed from the mid 19th century.
The heavily armed carrack, first developed in Portugal for either trade or war in the Atlantic Ocean, was the precursor of the ship of the line. Other maritime European states quickly adopted it in the late 15th and early 16th centuries. These vessels were developed by fusing aspects of the cog of the North Sea and galley of the Mediterranean Sea. The cogs, which traded in the North Sea, in the Baltic Sea and along the Atlantic coasts, had an advantage over galleys in battle because they had raised platforms called "castles" at bow and stern that archers could occupy to fire down on enemy ships or even to drop heavy weights from. Over time these castles became higher and larger, and eventually were built into the structure of the ship, increasing overall strength. This aspect of the cog remained in the newer-style carrack designs and proved its worth in battles like that at Diu in 1509.