Guatemala remained part of Mexico when that country won independence from Spain in 1821.
Shortly afterward, in 1823, it broke away from Mexico as the United Provinces of Central America, or Central American Federation.
Political conflict doomed the union. Liberals who wanted a strong federation with progressive reforms were stymied by rich conservatives who wanted to protect their wealth. Each province feared that some other province would become too powerful.
By 1842, the federation had crumbled. The separate nations of Guatemala, El Salvador, Nicaragua, Honduras, and Costa Rica emerged.