The racist nature of colonial rule had created deep dissatisfaction amongst many groups in Central America. A fundamental issue was Spain's determination to keep wealth and power in the hands of those born in the motherland, a policy that left growing numbers of subjects hungry for power and change. The spark that precipitated independence was Napoleon's invasion of Spain, after which a mood of reform swept through the colonies, including Central America.
Brigadier Don Gabino Gainza, the Captain General of Central America, bowed to liberal demands for independence but still hoped to preserve the colonial power structure when he signed the
Act of Independence
on September 15, 1821. Mexico promptly sent troops to annex Guatemala but by 1823 Guatemala had joined a
Central American federation
with a US-style liberal constitution. Religious orders were abolished, the death penalty and slavery done away with, and trial by jury, a general school system, civil marriage and the Lívingston law code were all instituted.
The liberal era was soon overthrown by a revolt from the mountains. The indigenous population, hit hard by a cholera epidemic and seething with discontent, marched on Guatemala City behind a charismatic leader, the 23-year-old
Rafael Carrera
. Carrera respected no authority other than that of the Church, and upon seizing power he reversed all the liberal reforms with the support of conservative religious and landowning lobbies. Carrera then fought a bitter war against the rest of the Central American federation and Guatemala declared itself a an
independent republic
in 1847. Carrera died in 1865, at the age of 50, leaving the country ravaged by the chaos of his tyranny and inefficiency. He was succeeded by
Vicente Cerna
, another conservative, who was to rule for the next six years.
Meanwhile, the opposition was gathering momentum yet again and 1867 saw the first
liberal uprising
, led by
Serpio Cruz
. His bid for power was unsuccessful but it inspired two young liberals, Justo Rufino Barrios and Francisco Cruz, to follow suit. In the next few years they mounted several other unsuccessful revolts, and in 1870 Serpio Cruz was captured and hanged.