The task of the army was intended to be the relief of the besieged fortress of Belfort and the interruption of the German supply lines. However, after the French gaining an advantage in the battle of Villersexel the Germans regrouped and brought in reinforcements and the French suffered a defeat near Belfort in the battle of the Lisaine. The retreat to the south went chaotically and slowly, and the army was surrounded in the area of Pontarlier, close to the Swiss border.