United Provinces of Central America
The United Provinces of Central America were a federation of Guatemala, El Salvador, Honduras, Nicaragua and Costa Rica, formed in 1823 when the former Captaincy General of Guatemala left the Mexican Empire. Its capital was Guatemala City, from 1834 San Salvador. The republic was torn by the struggle of liberals and conservatives, with the liberal president Francisco Morazán leading the federalists. In 1838–1840 the states left the union one after another, and the conservative leader Rafael Carrera defeated Morazán.