Revolution soon drove Spain off the mainland of the Americas.
By 1825, all of Spain’s colonies in South America and Central America had rebelled and won their independence.
Mexico became independent in 1821. All that was left of Spanish America were the West Indian colonies of Cuba and Puerto Rico.
Both of these would be lost in the Spanish American War of 1898.