In 1808, following the Spanish uprising against the French, Morla took action against a French naval squadron in Cadiz Bay, forcing its surrender in June. The following month he led forces from Cadiz at the battle of Balien, when the Spanish army defeated a French advance into Andalusia. However later defeats convinced the Spanish Cortes that further resistance was useless and Morla was sent to Madrid to negotiate a capitulation. This attempt was rejected and he surrendered to the French as a prisoner of war.