The Spanish American wars of independence took place throughout Spanish America during the early 19th century, with the aim of political independence from Spanish rule. Struggles for sovereignty in both hemispheres began shortly after the outbreak of the Peninsular War as a front in the larger Napoleonic Wars, between royalists who favored a unitary monarchy, and patriots who favored either plural monarchies or republics. Thus, the strict period of military campaigns would go from the Battle of Chacaltaya (1809), in present-day Bolivia, to the Battle of Tampico (1829) in Mexico.