The Kearny Code refers to a set of laws and regulations established by General Stephen W. Kearny during the American occupation of New Mexico in the 1840s. This legal framework aimed to provide order and governance in the newly acquired territory, facilitating the transition from Mexican rule to American administration. The Kearny Code also recognized local customs and laws, which helped to ease tensions between the diverse populations in New Mexico.