The declaration and fight for independence (1810–1818) was followed by an extended civil war that lasted until 1861.