|Territory of New Mexico|
|Organized incorporated territory of the United States|
|Federal Arizona and New Mexico Territories, split from the original New Mexico Territory of 1851, showing existing counties.|
|Government||Organized incorporated territory|
|•||1851–1852||James S. Calhoun|
|•||1910–1912||William J. Mills|
|Legislature||New Mexico Territorial Legislature|
|•||Treaty of Guadalupe Hidalgo||May 30, 1848|
|•||Organic Act (part of Compromise of 1850)||September 9, 1850|
|•||Gadsden Purchase||June 24, 1853|
|•||Colorado Territory established||February 28, 1861|
|•||Arizona Territory established||February 24, 1863|
|•||Statehood||January 6, 1912|
The Territory of New Mexico was an organized incorporated territory of the United States that existed (with varying boundaries) from September 9, 1850, until January 6, 1912, when the remaining extent of the territory was admitted to the Union as the State of New Mexico, making it the longest-lived organized incorporated territory of the United States, lasting approximately 62 years.
In 1846, during the Mexican–American War, the U.S. provisional government of New Mexico was established. Territorial boundaries were somewhat ambiguous. After the Mexican Republic formally ceded the region to the United States in 1848, this temporary wartime/military government persisted until September 9, 1850.
Earlier in the year 1850, a bid for New Mexico statehood was underway under a proposed state constitution prohibiting slavery. The request was approved at the same time that the Utah Territory was created to the north. The proposed state boundaries were to extend as far east as the 100th meridian West and as far north as the Arkansas River, thus encompassing the present-day Texas and Oklahoma panhandles and parts of present-day Kansas, Colorado, Utah, and Arizona, as well as most of present-day New Mexico. Texas raised great opposition to this plan, as it claimed much of the same territory, although it did not control these lands. In addition, slaveholders worried about not being able to expand slavery to the west of their current slave states.
The Compromise of 1850 put an end to the push for immediate New Mexico statehood. Approved by the United States Congress in September 1850, the legislation provided for the establishment of New Mexico Territory and Utah Territory. It also firmly established the disputed western boundary of Texas.
The status of slavery during the territorial period provoked considerable debate. The granting of statehood was up to a Congress sharply divided on the slavery issue. Some (including Stephen A. Douglas) maintained that the territory could not restrict slavery, as under the earlier Missouri Compromise, while others (including Abraham Lincoln) insisted that older Mexican Republic legal traditions of the territory, which abolished black, but not Indian, slavery in 1834, took precedence and should be continued. Regardless of its official status, slavery was rare in antebellum New Mexico. Black slaves never numbered more than about a dozen. 
As one of the final attempts at compromise to avoid the Civil War, in December 1860, a U.S. House of Representatives committee proposed to admit New Mexico as a slave state immediately. Although the measure was approved by the committee on December 29, 1860, Southern representatives did not take up this offer, as many of them had already left Congress due to imminent declarations of secession by their states. 
On February 24, 1863, during the Civil War, Congress passed the " Arizona Organic Act", which split off the western portion of the then 12-year-old New Mexico Territory as the new Arizona Territory, and abolished slavery in the new Territory. As in New Mexico, slavery was already extremely limited, due to earlier Mexican traditions, laws, and patterns of settlement. The northwestern corner of New Mexico Territory was included in Arizona Territory until it was added to the southernmost part of the newly admitted State of Nevada in 1864. Eventually, Arizona Territory was organized as the State of Arizona.
The Purchase treaty defines the new border as "up the middle of that river (the Rio Grande) to the point where the parallel of 31° 47' north latitude crosses the same ; thence due west one hundred miles; thence south to the parallel of 31° 20' north latitude; thence along the said parallel of 31° 20' to the 111th meridian of longitude west of Greenwich ; thence in a straight line to a point on the Colorado River twenty English miles below the junction of the Gila and Colorado rivers; thence up the middle of the said river Colorado until it intersects the present line between the United States and Mexico." The new border included a few miles of the Colorado River at the western end; the remaining land portion consisted of line segments between points, including at the Colorado River, west of Nogales at , near AZ-NM-Mexico tripoint at , the eastern corners of NM southern bootheel ( Hidalgo County) at , and the west bank of Rio Grande at .
The boundaries of the New Mexico Territory at the time of establishment (September 9, 1850) contained most of the present-day State of New Mexico, more than half of the present-day State of Arizona, and portions of the present-day states of Colorado and Nevada. Although this area was smaller than what had been included in the failed statehood proposal of early 1850, the boundary disputes with Texas had been dispelled by the Compromise of 1850.
The Gadsden Purchase was acquired by the United States from Mexico in 1853/1854 (known as the "Venta de La Mesilla" or the "Sale of La Mesilla"), arranged by the then-American ambassador to Mexico, James Gadsden. This added today's southern strip of Arizona and a smaller area in today's southwestern New Mexico to the New Mexico Territory, bringing its land area to the maximum size achieved in its history as an organized territory. The land of 29,640 square miles (76,800 km2) provided a more easily constructed route for a future southern transcontinental railroad line (second of the routes) for the future Southern Pacific Railroad, constructed later in 1881/1883. 
The Colorado Territory was established by the " Colorado Organic Act" on February 28, 1861, with the same boundaries that would ultimately constitute the State of Colorado. This Act removed the Colorado lands from the New Mexico Territory.
The creation of the Union Arizona Territory (two years after the ill-fated Confederate Arizona Territory) by the " Arizona Organic Act" on February 24, 1863, removed all the land west of the 109th meridian from the New Mexico Territory, i.e. the entire present-day State of Arizona plus the land that would become the southern part of the State of Nevada in 1864.  This Act left the New Mexico Territory with boundaries identical to the eventual State of New Mexico for a half-century until admitted to the Union in 1912 as the 47th state (followed just under six weeks later by the Arizona Territory/ State of Arizona, which became the 48th state, finally filling out the coast-to-coast continental expanse of the United States).
As the route to California, New Mexico Territory was disputed territory during the American Civil War. Settlers in the southern part of the Territory willingly joined the Confederate States in 1861 as the newly organized Confederate Territory of Arizona, with a representative delegate to the Confederate Congress in the capital of Richmond. This territory consisted of the southern half of the earlier Federal New Mexico Territory of 1851 and was in contrast to the later Federal Arizona Territory established by the Union in 1863, which was the western half split off from the original U.S. New Mexico Territory. The short-lived Confederate Arizona Territory was the first American territorial entity to be called "Arizona".
The Battle of Glorieta Pass in May 1862, following the retreat of Texan Confederate forces back south to El Paso, placed the area of the Rio Grande valley and eastern New Mexico Territory with the capital of Santa Fe under the control of the Federals with their Union Army.  However, the government and leadership of the Confederate Arizona Territory persisted until the end of the Civil War in June 1865 with the surrender of the Trans-Mississippi Department, living in exile in El Paso, Texas with its delegate still in Richmond.
- Adams–Onís Treaty, 1819
- American Civil War, 1861–1865
- Compromise of 1850
- Gadsden Purchase, 1853/1854
- Governors of the Territory of New Mexico
- History of New Mexico
- Mexican–American War, 1846–1848
Territorial evolution of the United States
- Territories of Spain that encompassed land that would later become part of the Territory of New Mexico:
- Territory of
France that encompassed land that would later become part of the Territory of New Mexico:
- Louisiane, 1682–1764 and 1803
- States and territory of Mexico that encompassed land that would later become part of the Territory of New Mexico:
- Territorial claim of the Republic of Texas, 1836–1845
U.S. territories that encompassed land that would later become part of the Territory of New Mexico:
- Louisiana Purchase, 1803–1804
- District of Louisiana, 1804–1805
- Territory of Louisiana, 1805–1812
- Territory of Missouri, 1812–1821
- Former territorial claim of the Republic of Texas, 1845–1850
- U.S. military government of New Mexico, 1846
- U.S. provisional government of New Mexico, 1846–1850
- Mexican Cession, 1848
- State of Deseret, 1849–1850 (extralegal)
- U.S. territories that encompassed land that had previously been part of the Territory of New Mexico:
- U.S. states that encompass land that had once been part of the Territory of New Mexico:
- Treaty of Guadalupe Hidalgo, 1848
|Wikimedia Commons has media related to New Mexico Territory.|
- New Mexico Territory Slave Code (1859–1867) | The Black Past: Remembered and Reclaimed
- David M. Potter (1976). The Impending Crisis. Harper & Row. pp. 533–534. ISBN 978-0-06-131929-7.
- "Department of State – Gadsden Purchase". Archived from the original on July 12, 2007. Retrieved 2008-04-04.
- New York Times – The New Territory of Arizona
- National Park Service – The Battle of Glorieta
- David L. Caffey, Chasing the Santa Fe Ring: Power and Privilege in Territorial New Mexico. Albuquerque, NM: University of New Mexico Press, 2014.