American settlers in Texas rebelled against Mexican rule in 1835 and declared independence in 1836. Texas remained an independent republic for nine years before becoming a U.S. state in 1845. This led the U.S. and Mexico to go to war from 1846 to 1848 over the boundary between Texas and Mexico. Through the Treaty of Guadalupe Hidalgo, Mexico ceded much of the modern Southwest to the U.S., including California, Nevada, Utah, and parts of other states, in exchange for $15 million. This war significantly increased U.S. territory and the number of Mexican citizens living under American rule.