The United States began to expand its territory into Texas in the 1820s and 1830s. In 1836, Texas declared independence from Mexico. The United States annexed Texas in 1845, which led to the Mexican-American War. The United States won the Mexican-American War in 1848, and as a result, Mexico ceded the territories of California and New Mexico to the United States.
The acquisition of California and New Mexico gave the United States control of the entire Pacific coast of North America. This allowed the United States to expand its trade and commerce with Asia, and it also made it possible for the United States to build a transcontinental railroad. The transcontinental railroad was completed in 1869, and it helped to connect the eastern and western United States.
The expansion of the United States into Texas, California, and New Mexico was a major turning point in American history. It increased the size of the country by more than half, and it gave the United States a presence on the Pacific Ocean. This expansion also helped to shape the identity of the United States as a nation.