After the army fought in the Gran Colombia–Peru War (1828-1829), and once Venezuela separated from Gran Colombia in 1830, the country went through periods of great instability and civil wars throughout the 19th century, which led to the end of the professional army and in its place emerged the figure of the regional leader ("caudillo") who organized their "montoneras" (irregular militia) to fight in internal civil wars. This precarious situation ends when in 1899 Cipriano Castro comes to power and once again lays the foundations for a professional army, which his successor Juan Vicente Gómez deepens.