The Federal Republic of Central America (Spanish: RepĂșblica Federal de Centro AmĂ©rica), initially known as the United Provinces of Central America (Provincias Unidas del Centro de AmĂ©rica), was a sovereign state in Central America that existed between 1823 and 1839/1841. The republic was composed of five states (Costa Rica, El Salvador, Guatemala, Honduras, and Nicaragua), and a Federal District from 1835 to 1839. Guatemala City was its capital city until 1834, when the seat of government was relocated to San Salvador. The Federal Republic of Central America was bordered on the north by Mexico, on the south by Gran Colombia and on the east by the Kingdom of Mosquitia and British Honduras, both claimed by the federal republic.
After Central America (then the Captaincy General of Guatemala) declared its independence from the Spanish Empire in September 1821, it was annexed by the First Mexican Empire in January 1822 before regaining its independence and forming a federal republic in 1823. The Federal Republic of Central America adopted its constitution, based on that of the federal government of the United States, in November 1824. It held its first presidential election in April 1825, during which liberal politician Manuel José Arce was elected as the country's first president. Arce subsequently aligned himself with the country's conservatives due to liberal opposition to the concessions he granted conservatives to secure his election as president. The republic was politically unstable, experiencing civil wars, rebellions, and insurrections by liberals and conservatives. From 1827 to 1829, it fell into a civil war between conservatives who supported Arce and liberals who opposed him. Liberal politician Francisco Morazån led the liberals to victory, and was elected president in 1830. The republic descended into a second civil war from 1838 to 1840, by the end of which the states of Central America declared independence and the federal republic ceased to exist.