The Venezuelan War of Independence (1810-1823) began on April 19, 1810, when Caracas deposed Captain General Vicente Emparan and established a ruling junta. Independence was formally declared on July 5, 1811, but royalist forces recaptured the territory twice. Simon Bolivar led successive campaigns, losing the First and Second Republics before securing victory at the Battle of Carabobo in June 1821. The last Spanish holdout, Puerto Cabello, fell in October 1823. Venezuela subsequently joined Gran Colombia before separating as a sovereign state in 1830.