As the French regrouped, the allies advanced towards Burgos. Wellington besieged Burgos between 19 September and 21 October, but failed to capture it. Together, Joseph and the three marshals planned to recapture Madrid and drive Wellington from central Spain. The French counteroffensive caused Wellington to lift the Siege of Burgos and retreat to Portugal in the autumn of 1812, pursued by the French and losing several thousand men. Napier wrote that about 1,000 allied troops were killed, wounded and missing in action, and that Hill lost 400 between the Tagus and the Tormes, and another 100 in the defence of Alba de Tormes. 300 were killed and wounded at the Huebra where many stragglers died in woodland, and 3,520 allied prisoners were taken to Salamanca up to 20 November. Napier estimated that the double retreat cost the allies around 9,000, including the loss in the siege, and said French writers said 10,000 were taken between the Tormes and the Agueda. But Joseph's dispatches said the whole loss was 12,000, including the garrison of Chinchilla, whereas English authors mostly reduced the British loss to hundreds. As a consequence of the Salamanca campaign, the French were forced to evacuate the provinces of Andalusia and Asturias.