In 1808 Schwarz was appointed to lead a cavalry brigade in the 12,714-man Corps of Observation of the Eastern Pyrenees under the overall command of Guillaume Philibert Duhesme. The brigade consisted of the Italian "Prince Royal" Chasseurs a Cheval, 504 sabers and the 2nd Neapolitan Chasseurs a Cheval, 388 sabers. On 29 February 1808, on the pretext of having a military review of his division, Giuseppe Lechi rushed his troops into the fortress of Barcelona and hustled the bewildered Spanish garrison out. By such treachery, Emperor Napoleon seized Barcelona and other Spanish cities and precipitated war with his former ally. After the Dos de Mayo Uprising, Emperor Napoleon ordered Duhesme to send 4,000 troops to seize Lerida and another 4,000 to march to Valencia to cooperate with Marshal Bon-Adrien Jeannot de Moncey's corps. These instructions grossly underestimated the strength of the Spanish revolt but Duhesme dutifully tried to carry them out. He assigned Schwarz a task force of 3,247 men to capture Lerida. This "ad hoc" brigade included the 3rd Battalion of the 2nd Swiss Regiment, 580 men, the 1st and 2nd Battalions of the 1st Neapolitan Regiment, 1,944 men, the 1st Battalion of the 1st Italian "Velite" Regiment, 519 men, one squadron of the 3rd Provisional Cuirassier Regiment, 204 sabers, and four artillery pieces. Duhesme sent Joseph Chabran with 3,195 men to Valencia. While Chabran's force included three French battalions and two French cavalry regiments, Schwarz had to march with a force of "doubtful value".