 The appointment enraged a heavily religious and conservative Spanish population.Resistance to French aggression soon spread throughout Spain.The shocking French defeat at the Battle of Bailén in July gave hope to Napoleon's enemies and partly persuaded the French emperor to intervene in person.