The Battle of Andoain (Basque: Andoaingo Gudua) was a battle fought on 14 September 1837, during the First Carlist War in northern Spain. The action took place in Andoain, south of the main Liberal stronghold of San Sebastián. Liberal troops, led by the Spanish General Leopoldo O'Donnell, had captured Andoain on 9 September, driving the Carlist garrison to the western bank of the river Oria. Then followed a three-day period of breastwork building by both sides and sporadic fighting. After two days of trench warfare, the Carlist poured heavy artillery fire on the Liberals lines and launched an all-out offensive by midday supported by reinforcements brought in from Navarra by General José Ignacio de Uranga. The Liberals were flanked on their left wing, and their lines crumbled. Only two British Auxiliary Legion Regiments and a number of their Basque local guides, the Chapelgorris, were left to resist the Carlist advance, but were eventually outnumbered and overran. Most of the British who surrendered to the Carlists were executed, accused of burning several local farms in the previous days. The battle meant the end of the British Auxiliary Legion as an effective fighting force, with two-thirds of their members killed, wounded or executed by the Carlists and local civilian residents. General O´Donnell and the remnants of his forces withdrew to Hernani.