Napoleon's invasion of Spain in 1808 weakened the Spanish monarchy's control over its American colonies. This power vacuum allowed local elites to form juntas and initiate self-governance, ultimately leading to the Latin American wars of independence.