The Kearny Code is a legal code named after General Stephen W. Kearny. The Kearny Code was promulgated in present-day Santa Fe, New Mexico on September 22, 1846 for use in the new New Mexico Territory, as occupied by the United States Army on August 18 during the U.S.-Mexican War. General Kearny on September 26 left with guide Kit Carson to engage in the Alta California theater of the war.