In attempts to retain or re-assert control over its colonies in America , the Spanish Empire  deployed several expeditionary forces  during and after the Spanish American wars of independence . The largest of these forces, known as "the expeditionary army of Costa Firme ",[ 1]   and consisting of over 10,000 troops under General Morillo , undertook the Spanish reconquest of New Granada  (1815–16).[ 2]   Forces were also sent to New Spain  between 1812 and 1817.[ 3]   Later, after Mexican independence  in 1821, a Spanish garrison was sent from Cuba  to occupy Spain's last Mexican outpost, the fortress of San Juan de Ulúa ; this force remained there until surrendering in 1825.[ 4]   Finally, a force under Isidro Barradas Valdés  attempted to regain control of Mexico  in 1829.[ 5]   
   
Viceroyalty of New Spain  
 Counter insurgency (1812-1821)       Period   year   Number of men   Units and Commanders (units changed names in 1820 )     European Expeditions   1812 - 1817   flag     year 1812           Unit  soldiers  Officers     Battalion Asturias (Mallorca)  270 men  -     Battalion Lobera (Infante Don Carlos)  847 men  Francisco Bucelli, teniente coronel     Regiment América (Murcia)  817 men,  one Battalion  Juan José Olazábal     Battalion Castilla (Voluntarios de Castilla)  649 men  Francisco Hevia     Battalion Zamora  910 men  Rafael Bracho     Battalion Fernando VII -expediciónario-  364 men  Ángel Díaz del Castro, teniente coronel   
     year 1813             Year 1815        Brigadier Fernando Miyares y Mancebo, commander of expedition      unit  soldiers  officers     Regiment Órdenes Militares  1126 men, 2 Battalions  Coronel Francisco LLamas     Battalion Voluntarios de Navarra (Barcelona)  623 men  Coronel José Ruiz   
     Year 1817        Mariscal de Campo Pascual Liñan, commander of expedition.      unit  soldiers  officers     Regiment Zaragoza  2 Battalions  brigadier Domingo Luaces   
   
 
 Defense of San Juan de Ulúa (1821-1825)        Date   Expeditions   Units      San Juan de Ulúa   Bandera de la flota naval y de las fortalezas españolas   Fortress San Juan de Ulúa   (Veracruz )      August 7, 1821        Brigadier Juan Rodríguez de la Torre, comandante en jefe      Unit  Soldiers     1º Company mixed form Regiments Habana and Luisiana, and Battalions Málaga, Cataluña and Tarragona.  105 men     2º Company de Battalion Pardos de la Habana.  75 men     3º Company de Battalion Morenos de la Habana.  75 men     4º Company de voluntarios.  105 men   
     August 1821             October 1822        1º Commander of fortress Brigadier  Francisco Lemaur.  834 soldiers y 44 officers, y 100 artillery men Battalion Cataluña and Málaga.       December 24, 1822        354 soldiers y 8 officers Battalion Málaga  75 soldiers Battalion Tarragona       March 1823        numbers similar to 1º relief from battalions Cataluña, Tarragona y Málaga.       August 1823             July 1824        227 men from Battalions Cataluña and Málaga.       January 1825        300 men battalions Cataluña and Tarragona, plus 116 men from Battalion Pardos y Morenos de Cuba.  2º Commander of fortress, brigadier José Coppinger .     
 
 Expedition of Isidro Barradas (1829)    Division of Vanguard (1829)  flag    Commander  
  Units  
 Regiment de la Corona (3 Battalions ) I Battalion Rey Fernando  II Battalion Reina Amalia  III Battalion Real Borbón   Squadron of cavalry (dismounted) (incomplete)  Company of artillery (short)    
 
Expeditionary Army of Costa Firme  (Venezuela and New Granada ) 
 
 Viceroyalty of Perú  (Perú, Chile and Upper Peru ) 
 
References    ^   The Americas  . Academy of American Franciscan History. 1961. p. 173.    ^   Lynch, Spanish American Revolutions , 209. Rodríguez, Independence of Spanish America , 122. Kinsbruner, Independence in Spanish America , 57.    ^   Small contingents from Spain had been arriving in the Americas since 1810.  On August 25, 1810, a group of Spanish Marines  arrived in Veracruz  from Cádiz  on the frigate , Nuestra señora de Atocha  under the command of Rosendo Porlier  and accompanying Viceroy Francisco Javier Venegas .  These were the first Spaniards to have come from Europe in support of royalists . Frieyro de Lara. Guerra ejército y sociedad en el nacimiento de la España contemporánea . (2009, Universidad de Granada) p. 660.    ^   Jaime E. Rodríguez O. (2005). The Divine Charter: Constitutionalism and Liberalism in Nineteenth-century Mexico  . Rowman & Littlefield. pp. 205– 6. ISBN  978-0-7425-3710-1 .     ^   Ruiz Gordejuela Urquijo, Jesús (2006). La expulsión de los españoles de México y su destino incierto, 1821-1836  . Universidad de Sevilla. ISBN  978-84-00-08467-7 .