 He was held a prisoner in San Juan de Ulúa (Veracruz) until 1813, after which he was sent to Spain.He contracted a severe case of rheumatism in the prison.In Spain, he joined a military unit fighting the French.