Most of the area had been the Mexican territory of Alta California, while a southeastern strip on the Rio Grande had been part of Santa Fe de Nuevo México, most of whose area and population were east of the Rio Grande on land that had been claimed by the Republic of Texas since 1835, but never controlled or even approached aside from the Texan Santa Fe Expedition. Mexico controlled the territory later known as the Mexican Cession, with considerable local autonomy punctuated by several revolts and few troops sent from central Mexico, in the period from 1821–22 after independence from Spain up through 1846 when U.S. military forces seized control of California and New Mexico on the outbreak of the Mexican-American War. The northern boundary of the 42nd parallel north was set by the Adams–Onís Treaty signed by the United States and Spain in 1821 and ratified by Mexico in 1831 in the Treaty of Limits (Mexico-United States). The eastern boundary of the Mexican Cession was the Texas claim at the Rio Grande and extending north from the headwaters of the Rio Grande, not corresponding to Mexican territorial boundaries. The southern boundary was set by the Treaty of Guadalupe Hidalgo, which followed the Mexican boundaries between Alta California (to the north) and Baja California and Sonora (to the south). The United States paid Mexico $15 million for the damage caused by the war, not the land which became known as the Mexican Cession.