sentences:  The annexation of Texas by the United States on February 19, 1846, and US General Stephen W. Kearny's taking of Santa Fe, New Mexico in August of that year, made these lands subject to American control under the Kearny Code and the US provisional government of New Mexico, but the area remained in the minds of many long-term residents part of the Republic of Mexico under President Santa Ana.During the Mexican–American War, beginning on April 25, 1846, much of New Mexico including Mora County was subject to the military occupation of United States under martial law.During the Taos Revolt of the war, Mexican-nationalist Hispano and Puebloan militia fought the United States Army, repelling a small force in the First Battle of Mora on January 24, 1847, only to endure the village and surrounding ranches, farms, and crops being burned to the ground in the Second Battle of Mora on February 1, effectively ending active rebellion in the area.