Mexico was a colony.
Mexico ( México , [ ˈme.xi.ko ] , modern Nahuatl ) , officially the United Mexican States ( [ Estados Unidos Mexicanos , links = no ] , ) , is a federal republic in the southern portion of North America . In 1521 , the Spanish Empire conquered and colonized the territory from its base in Mexico-Tenochtitlan , which was administered as the viceroyalty of New Spain .