New Mexico Territory
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 final extent of the territory was admitted to the Union as the State of New Mexico.
Before the Territory was organized 
In 1846, during the Mexican-American War, the U.S. provisional government of New Mexico was established. Territorial boundaries were somewhat ambiguous. After Mexico formally ceded the region to the USA in 1848, this temporary wartime government persisted until September 9, 1850.
Earlier in the year 1850, a bid for New Mexico statehood was underway under a proposed state constitution outlawing slavery. The proposed state boundaries were to extend as far east as the 100th parallel 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. Substantial opposition to this plan came from Texas, which claimed much of the same territory, although not actually controlling those lands.
Compromise of 1850 and disputes over slavery 
The Congressional Compromise of 1850, taking effect on September 9th of that year, halted the 1850 bid for New Mexico statehood. At the same time, other provisions of the Compromise of 1850 established the organized New Mexico Territory and the neighboring Utah Territory and firmly established the boundaries of the state of Texas that persist to this day.
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 legal traditions, which forbade slavery, took precedence. 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, House Republicans offered to admit New Mexico as a slave state immediately. Although the measure was approved by committee on December 29, 1860, the South did not take up this offer.[clarification needed] 
On February 24, 1863, during the American Civil War, Congress established the new Arizona Territory by splitting off the western portion of the New Mexico Territory -- lands that would ultimately become the state of Arizona and the southernmost part of Nevada. The act of establishment, known as the Arizona Organic Act, abolished slavery in the Arizona Territory.
Territorial evolution 
The boundaries of the New Mexico Territory at the time of establishment (September 9, 1850) contained most of present-day New Mexico, more than half of present-day Arizona, and portions of present-day Colorado and southern 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 USA (from Mexico) in 1853. This added today's southern Arizona and a smaller area in today's southwestern New Mexico to the New Mexico Territory, bringing its land area to the maximum size of its history as an organized territory.
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 New Mexico Territory.
The creation of Arizona Territory on February 24, 1863 by the Arizona Organic Act removed all the lands west of the 109th meridian from New Mexico Territory, i.e. the entire future state of Arizona plus the land that would eventually become southern Nevada. This Act left New Mexico Territory with boundaries identical to the eventual state of New Mexico.
Civil War 
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 Confederate Arizona Territory. This territory consisted of the southern half of New Mexico Territory, in contrast to the Arizona Territory established by the Union in 1863, which was the western half. The Confederate Arizona Territory was the first American territorial entity called Arizona.
The Battle of Glorieta Pass placed the area under the control of the Union.  However, the government of the Confederate Arizona Territory persisted until the end of the Civil War, in exile in El Paso, Texas.
See also 
- Adams-Onís Treaty, 1819
- American Civil War, 1861–1865
- Compromise of 1850
- Gadsden Purchase, 1853
- 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
- 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.
- William L. Marcy. "The Avalon Project: Gadsden Purchase Treaty: December 30, 1853". Yale University. Retrieved 2008-10-10. 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
- Department of State - Gadsden Purchase
- New York Times - The New Territory of Arizona
- National Park Service - The Battle of Glorieta