After the death of Zumalacárregui in 1835, the Liberals slowly regained the initiative but were not able to win the war in the Basque districts until 1839.
The war in the Basque Country ended with the Convenio de Bergara, also known as the Abrazo de Bergara ("the Embrace of Bergara", Bergara in Basque) on 31 August 1839, between the Liberal general Baldomero Espartero, Count of Luchana and the Carlist General Rafael Maroto.