<P> Inhabited by Native Americans for thousands of years before European exploration , it was colonized by the Spanish in 1598 as part of the Imperial Spanish viceroyalty of New Spain . It was named Nuevo México after the Aztec Valley of Mexico by Spanish settlers , 223 years before the establishment of the present - day country of Mexico . The present - day state of New Mexico was not named after , nor is it a part of , Mexico . Its geographic characteristics made settlement and effective political control difficult which prompted Mexico 's invasion and control of the area from 1824 to 1846 . New Mexico 's Spanish origins made cultural integration with Mexico unsuitable , which sparked the Revolt of 1837 and a growing economic association with the expanding United States . The 1848 Mexican -- American War indirectly capitalized on this tension and created the U.S. New Mexico Territory . It was admitted to the Union as the 47th state on January 6 , 1912 . </P>
new mexico was admitted to the union as the ... state
47th