Santa Fe de Nuevo México (shortened to Nuevo México and translated into English as New Mexico) was a part of New Spain from 1598 until 1824 and a territory of Mexico from 1598 until 1846. Then it was occupied by the United States of America during the Mexican–American War in 1846.