Between 1540 and 1821 possessed Spain a large territory in South and Mid America which was known as the Captaincy General of Guatemala. In 1821 ended a revolt the Spanish authority and was in September in that year replaced by the so called Federal Republic of Central America or until 1824 the United Provinces of Central America as an independent democratic republic although annexed by the First Mexican Empire.(1) This state consisted of Guatemala, El Salvador, Honduras, Nicaragua and Costa Rica. In 1830 was Los Altos consisting of parts of Guatemala and Mexico added to the republic. A civil war broke out in 1838 causing the officially end of republic when El Salvador percolated her independence. A year earlier had 4 of the 5 states staring with Nicaragua in 1838 this all ready done.
Note
1. This Mexican Empire was the successor of the former Spanish colony New Spain which declared independent on 15 September 1821 and with Agustin de Iturbide as emperor between 21 July 1822 and 19 March 1823 an empire. Agustin Cosme Damián de Iturbide y Aramburu (27 September 178 Valladolid, Michoacán3-19 July 1824 Padilla, Tamaulipas) was also known as Augustine I. After his forced abdication he went to Europe, first to Livorno and from there to England, returning to Mexico on 14 July 1824 where he was executed five days later. See for him also the note on this web log “British 6th rate Tamar escorted former Mexican emperor Iturbide to Genoa 18 July 1823”.
Source
J.W. Norie/J.S. Hobbs. Three hundred and six illustrations of the maritime flags off all nations. London, 1848.