 Álvarez was preparing to defend it against them when he received direct orders of his Commander in Chief to hand it over.Álvarez fled Barcelona and joined the Spanish rebels against French rule.The Spanish Government in Cadiz named him commander of the Army of Catalonia and Governor of Girona.