Field works are as old as armies. Roman legions, when in the presence of an enemy, entrenched camps nightly when on the move. In the early-modern era troops used field works to block possible lines of advance. For example:
- Members of the Grand Alliance built the Lines of Stollhofen at the start of the War of the Spanish Succession of 1702–1714. The works ran for about 15 km (10 mi) from Stollhofen on the Rhine to the impenetrable woods on the hills east of Bühl. They played a pivotal role in manoeuvring that took place before the Battle of Blenheim (1704). The French captured these lines in 1707 and demolished them.
- The French built the 19-kilometre-long (12 mi) Lines of Weissenburg during the War of the Spanish Succession under the orders of the Duke of Villars in 1706. These were to remain in existence for just over 100 years and were last manned during Napoleon's Hundred Days (1815). By 1870 the Lines no longer existed, but the two central forts in the towns of Wissembourg and Altenstadt still possessed fortifications that proved useful defensive positions during the Battle of Wissembourg.
- The French built the Lines of Ne Plus Ultra (Latin for "no further") during the winter of 1710–1711, which have been compared to the trenches of World War I. They ran from Arras to Cambrai and Valenciennes where they linked up with existing defensive lines fronted by the river Sambre. In the 1711 campaign season the Duke of Marlborough breached them through "a magnificent piece of manoeuvring".
- During the Peninsular War, the British and Portuguese constructed the Lines of Torres Vedras in 1809 and 1810; these proved effective in stopping the French advance on Lisbon in 1810.
Although Napoleon Bonaparte started his military career in artillery, campaigning in the Napoleonic Wars generally emphasized movement rather than static entrenchment. But innovations in trench warfare became more prominent in the course of the 19th century.
In the New Zealand Wars (1845–1872), the indigenous Maori developed elaborate trench and bunker systems as part of fortified areas known as pā, employing them successfully as early as the 1840s to withstand British cannon, muskets, and an experimental poison-gas mortar. These systems included firing trenches, communication trenches, tunnels, and anti-artillery bunkers. British casualty rates of up to 45 percent, such as at Gate Pa in 1844 and the Battle of Ohaeawai in 1845, suggested that contemporary firepower was insufficient to dislodge defenders from a trench system. There has been an academic debate surrounding this since the 1980s, when in his book The New Zealand Wars, historian James Belich claimed that Northern Māori had effectively invented Trench warfare during the first stages of the New Zealand Wars. However, this has been criticised by some other academics, with Gavin McLean noting that "Māori had certainly adapted pā to suit the musket, but others dismissed Belich’s claim as baseless post-colonial revisionism."
The Crimean War (1853–1856) saw "massive trench works and trench warfare",
even though "the modernity of the trench war was not immediately apparent to the contemporaries".
North American armies employed field works in the American Civil War (1861–1865) — most notably in the sieges of Vicksburg (1863) and Petersburg (1864–1865), the latter of which saw the first use by the Union Army of the rapid-fire Gatling gun, the important precursor to modern-day machine guns. Trenches also featured in the Paraguayan War (which started in 1864), the Second Anglo-Boer War (1899–1902), and the Russo-Japanese War (1904–1905).
Fundamentally, as the range and rate of fire of rifled small-arms increased, a defender shielded from enemy fire (in a trench, at a house window, behind a large rock, or behind other cover) was often able to kill several approaching foes before they closed with his position. Attacks across open ground became even more dangerous after the introduction of rapid-firing artillery, exemplified by the "French 75", and high explosive fragmentation rounds. The increases in firepower had outstripped the ability of infantry (or even cavalry) to cover the ground between firing lines, and the ability of armour to withstand fire. It would take a revolution in mobility to change that.
Trench warfare has become archetypically associated with the World War I (1914–1918), when the Race to the Sea rapidly expanded trench use on the Western Front starting in September 1914. By the end of October 1914, the whole front in Belgium and France had solidified into lines of trenches, which lasted until the last weeks of the war. Mass infantry assaults were futile in the face of artillery fire, as well as rapid rifle and machine-gun fire. Both sides concentrated on breaking up enemy attacks and on protecting their own troops by digging deep into the ground. Trench warfare also took place on other fronts, including in Italy and at Gallipoli.
Symbol for the futility of war
Trench warfare has become a powerful symbol of the futility of war. Its image is of young men going "over the top" (over the parapet of the trench, to attack the enemy trench line) into a maelstrom of fire leading to near-certain death, typified by the first day of the Battle of the Somme (on which the British Army suffered nearly 60,000 casualties) or the grinding slaughter in the mud of Passchendaele. To the French, the equivalent is the attrition of the Battle of Verdun in which the French Army suffered 380,000 casualties.
Trench warfare is associated with mass slaughter in appalling conditions. Many critics have argued that brave men went to their deaths because of incompetent and narrow-minded commanders who failed to adapt to the new conditions of trench warfare: class-ridden and backward-looking generals put their faith in the attack, believing superior morale and dash would overcome the weapons and moral inferiority of the defender. British public opinion often repeated the theme that their soldiers were "lions led by donkeys".
World War I generals are often portrayed as callously persisting in repeated hopeless attacks against trenches. There were failures such as Passchendaele, and Sir Douglas Haig has often been criticised for allowing his battles to continue long after they had lost any purpose other than attrition. Haig's defenders counter that the attrition was necessary in order to cause attrition in the German army.
The problems of trench warfare were recognised, and attempts were made to address them. These included improvements in artillery, infantry tactics, and the development of tanks. By 1918, taking advantage of failing German morale, Allied attacks were generally more successful and suffered fewer casualties; in the Hundred Days Offensive, there was even a return to mobile warfare.