So, to my understanding, all the Spanish viceroyalties of the Americas were sworn to the Spanish crown and operated as extensions of Spain. Given that colonial framework, this meant part of Spain’s nobility, military, and administrators were spread outside of just Iberia. Mexico City and Havana were some of the most important cities in the whole empire. I know there was some shifting from Hapsburg to Bourbon rule, but clearly that shift still placed control of the Americas in the hands of Spain.
So, if Spain had all these colonies, which functioned more like semi-independent vassals sworn to a feudal lord, why didn’t they try to reclaim spain from Napoleon rather than establishing independence? They had militaries and navies. Many of their viceroys had some blood claim to the throne. Or, am I mistaken? Did some actually try to take spain back?