Trench warfare
Trench warfare has become archetypically associated with the First World War of 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.
Trench
Trenches have often been dug for military purposes. In the pre-firearm era, they were mainly a type of hindrance to an attacker of a fortified location, such as the moat around a castle (this is technically called a ditch). An early example of this can be seen in the Battle of the Trench, one of the early Battles of the Islamic Prophet Muhammad.