Throughout World War I, trench warfare was used by each side to both gain ground and to hold off attacks. These trenches used multiple defenses to slow or stop advancement by troops: parapets, mortar shells, mustard gas, mines, barbed wire and other nasty tools were heavily deployed. This multi-layered approach was implemented to thwart the various attack vectors that the enemy might use. Barbed wire, for example, is effective against soldiers, but not so much against tanks. This is where mines and mortar shells were far more useful. In the famous Battle of the Somme, trench warfare was so difficult that only miles were gained by the end of the war.