Cuesta joined forces with the British army under Wellington. Relations with his British allies were difficult, Cuesta promising and then failing to supply the British troops more than once, much to Wellesley's irritation. Further difficulties arose in the aftermath of the Battle of Talavera. Though the Anglo-Spanish army won the costly battle, Wellington planned for a withdrawal to stop French General Nicolas Soult and 30,000 troops cutting him off from Portugal. Cuesta refused to co-operate. Later, Wellington was furious when he heard that Cuesta abandoned the injured British soldiers Wellesley left in his care to the French as prisoners. More Spanish defeats followed as Cuesta attempted to fight the French without co-ordinating with his allies or attempting to gain prior advantage.