Despite his victory over elements of Marshal André Masséna's Army of Portugal at the Battle of Bussaco in September 1810, Viscount Wellington was forced by Masséna's subsequent maneuvering to withdraw his numerically inferior force behind the extensive series of fortifications he had prepared around Torres Vedras to protect the approaches to Lisbon. By 10 October 1810 only the British light division and some cavalry patrols remained outside the "Lines". Wellington manned the fortifications with "secondary troops"—25,000 Portuguese militia, 8,000 Spaniards and 2,500 British marines and artillerymen—keeping his main field army of British and Portuguese regulars dispersed in order to rapidly meet a French assault on any point of the Lines.
Masséna's Army of Portugal concentrated around Sobral, apparently in preparation to attack. However, after a fierce skirmish on 14 October in which the strength of the Lines became apparent, the French dug themselves in rather than launch a costly full-scale assault. They remained entrenched for a month before falling back to a position between Santarém and Rio Maior. Following Masséna's withdrawal, Wellington moved the 2nd Division under Lt. Gen. Hill, along with two Portuguese brigades and an attachment of Dragoons, across the Tagus to protect the plains of Alentejo—both from Masséna and a possible attack from Andalusia by the French Army of the South.
Napoleon had previously sent dispatches to Marshal Soult, commander of the Army of the South, urging him to send assistance to Masséna. The Emperor's orders were based on outdated intelligence and called for only a small force; by the time Soult received them the situation had changed considerably. Soult now knew a successful attack against Lisbon was beyond his means with the forces proposed—there were 30,000 Allied troops and six major fortresses between his army and the Portuguese capital—but he had received orders nonetheless and felt obliged to do something. He therefore gathered an army of 20,000 men, mainly from V Corps, and launched an expedition into Extremadura with the limited aim of capturing the fortress at Badajoz and hopefully drawing some of the Allied forces away from their impregnable positions in the Lines. Along with V Corps, this venture also pulled both infantry and cavalry from Marshal Victor's I Corps who were besieging Cádiz at the time. Soult ordered more of Victor's men to fill the gaps left by his use of V Corps; this was bitterly opposed by Victor since it severely weakened his own forces, leaving him with only 15,000 men besieging a city garrisoned by around 26,000 Allied troops.
Following a successful campaign in Extremadura, on 27 January 1811 Soult began his investment of Badajoz. Almost immediately the Spanish Army of Extremadura arrived in the vicinity with some 15,000 troops under the command of Gen. Mendizabal. Soult's army, too small to surround Badajoz, was unable to prevent 3,000 of Mendizabal's men from reinforcing the fortress and the remainder occupying the heights of San Cristóbal. This posed a major threat to the French, so Soult moved at once to engage. In the ensuing Battle of the Gebora the French inflicted 1,000 casualties on the Spanish field army and took 4,000 prisoners, at a cost to themselves of only 400 casualties. The remnants of Mendizabal's defeated army fled towards Badajoz or into Portugal.
The garrison of Badajoz, ably commanded by Gen. Rafael Menacho, initially put up strong resistance and by 3 March the French had made little progress against the powerful fortress. On that day, however, Menacho was killed on the ramparts by a chance shot; command of the garrison fell to Brig. Gen. José Imaz and the Spanish defense started to slacken. The walls were finally breached on 10 March. Soult was anxious to press the siege since he had learned that Masséna, in command of a disintegrating army plagued by sickness, starvation and an unusually harsh Portuguese winter, had retreated from Portugal. Concerned that the British would now be free to send a contingent to relieve Badajoz, Soult sent a deputation into the town to demand the garrison's surrender. Imaz duly capitulated and the French took possession of the fortress on 11 March.
On 12 March, news of Victor's defeat at the Battle of Barrosa reached Soult and he left Badajoz to return to Andalusia, anxious that the siege of Cádiz had been lifted. Reaching Seville on 20 March he was relieved to find that Victor's siege lines still held and Andalusia remained under French control. Before his departure Soult had consolidated his gains in Extremadura by garrisoning Badajoz with 11,000 French troops under the command of Marshal Édouard Mortier.