The origins of Bolivia are traceable to the Chuquisaca Revolution of 1809 in Upper Peru, followed by the La Paz revolution within the same year, which was part of the Latin American wars of independence against Spanish colonial governments. Despite other struggles for independence, the insurgents immediately formed a constitutional government who rejected any oath or compromise with Spain. The rebel government also integrated all parts of population, including "mestizos" and indigenous. However, by the early 1810, the rebels were defeated, with their leaders executed or hunted down, leaving the neighboring countries of Peru and Argentina to fight for the controls of the Upper Peru areas.