New Mexico was one of the last territories to become a state, gaining statehood in 1912. Before that, it had been part of the Spanish Empire, Mexico, and the United States Territory of New Mexico.