Apart from the odd setback, such as General Castaños' surprise victory at Bailén, in part due to guerrilla warfare between Madrid and Andalusia, and especially in the Sierra Morena, a victory which helped persuade the British government that Napoleon could be defeated, the French troops were largely undefeated on the open battlefield, but could not foresee not defeat a guerrilla war taking place.