The establishment of the territorial government refers to the creation and organization of a formal political structure in a newly acquired territory, enabling local governance and administration. In the context of New Mexico, this process followed the Treaty of Guadalupe Hidalgo, which ceded New Mexico to the United States in 1848, marking a significant shift in political control and initiating new laws and policies aimed at integrating the territory into the Union.