Bapaume was one of the war objectives in the Battle of the Somme. In 1916, Bapaume was one of the towns considered by the Allies as strategic objectives in the Battle of the Somme. Bapaume was occupied by the Germans on 26 September 1914 and then by the British on 17 March 1917. The town hall was destroyed on 25 March by a delayed action mine left by the Germans, killing 24 people, including Australian soldiers and two French MPs.
On 24 March 1918, the Germans retook the town.
In 1918, the Second Battle of Bapaume, from 21 August to 3 September, was part of the second phase of the Battle of Amiens, the British and Commonwealth attack that marked the turning point in the First World War on the Western Front and the beginning of the Allies' Hundred Days Offensive. Improved armoured support and artillery bombardments weakened once impregnable positions and helped Allied troops to blow holes in trenches. On 29 August, after heavy fighting, the New Zealand Division occupied Bapaume, having broken through the very strong trench system at Le Transloy-Loupart with the British 5th Infantry Division and taken many other strong points around the border.