Texas annexation
The whole of eastern New Mexico was claimed by the breakaway Republic of Texas in 1836, and became nominally US territory after of the Texas annexation in 1845, but was treated by the U.S. and many residents as a militarily occupied territory until 1848.