The colonies didn't accept the fact that Napoleon's brother was the new King of Spain so they started self-governing. When the situation is solved they didn't want to go back to being governed by Spain so they started seeking their independence and entering a series of wars of liberation. You could say that Napoleon's machinations put in motion their independence from Spain.