In 1840, it became a part of the short-lived Republic of the Rio Grande. In 1848, after the Mexican–American War, Tamaulipas lost more than a quarter of its territory via the Treaty of Guadalupe-Hidalgo. American president James K. Polk had desired to annexe Mexican territory as far south as Tampico although his negotiator Nicholas Trist disregarded this and settled on a border with Texas on the Rio Grande. Its capital was kept at Aguayo, which later was renamed Ciudad Victoria in honor of Guadalupe Victoria, first President of Mexico.