Latin America was at the time a colony of Spain.
When Napoleon invaded Spain and in 1808 forced the Spanish king to abdicate and made his brother the king of Spain, many people in America, loyal to Spain until then, refused to accept Joseph Bonaparte as their leader.
This meant that many people who previously opposed independence were in favour of it now, with the intention of returning under Spanish control once Spain gets independence from French Infuence - but this never happened, as the American countries remained independent even after France was no longer in control of Spain.