<P> The Federal Republic of Central America (Spanish: República Federal de Centroamérica), also called the United Provinces of Central America (Spanish: Provincias Unidas del Centro de América) in its first year of creation, was a sovereign state in Central America consisting of the territories of the former Captaincy General of Guatemala of New Spain . It existed from September 1823 to 1841, and was a republican democracy . It is also sometimes incorrectly referred to in English as the United States of Central America . </P> <P> The republic consisted of the present - day states of Guatemala, El Salvador, Honduras, Nicaragua, and Costa Rica . (Panama was part of Bolivar's República de Colombia in 1821). In the 1830s, a sixth state was added--Los Altos, with its capital in Quetzaltenango--occupying parts of what are now the western highlands of Guatemala and Chiapas state in southern Mexico . </P> <P> Shortly after Central America declared independence from the Spanish Empire, some of its countries were annexed by the First Mexican Empire in 1822 and then Central America formed the Federal Republic in 1823 . From 1838 to 1840 the federation descended into civil war, with conservatives fighting against liberals and separatists fighting to secede . The various political factions were unable to overcome their ideological differences and the federation dissolved after a series of bloody conflicts . </P> <P> From the 16th century through 1821, Central America, apart from Panama, formed the Captaincy General of Guatemala within the Spanish Empire . In 1821 a congress of Central American Criollos in Guatemala City composed the Act of Independence of Central America to declare the region's independence from Spain, effective on September 15 of that year . The process was bloodless with no resistance from the Spanish authorities as the Governor General Brigadier Gabino Gaínza, along with all the royal governors of the five provinces, were retained in office as executive powers pending a full transition to local rule . That date is still marked as independence day by most Central American nations . </P>

When did the union of independent central american states begin to fall apart