Texas was annexed as a state into the United States in 1845, and the Mexican–American War followed from 1846–1848. The war was concluded by the Treaty of Guadalupe Hidalgo, in which the U.S. received the lands contentiously claimed from Mexico by Texas (including the Oklahoma Panhandle), as well as lands west of the Rio Grande to the Pacific Ocean (the Mexican Cession). Statehood for Texas was politically charged, as it added another "slave state" to the Union, and the conditions for its statehood were not resolved until the Compromise of 1850. One of the conditions was that to be admitted as a slave state, Texas had to set its northern border at parallel 36°30' north as per the Missouri Compromise. In addition to relinquishing claims on lands north of this parallel, Texas also had to give up its claim to parts of what is now New Mexico east of the Rio Grande, however, in exchange, the U.S. assumed Texas' $10 million debt.