Americans started to expand west by the time Mexico had gained its independence. In order to protect the border region, Mexico needed to populate the area. Mexico continued the policy started by Spain of allowing Americans to settle Texas. With one exception, the Americans had to follow Mexican law, religion and customs. This settlement of Texas played into the United States expansion plans.
Eventually Mexico City closed Texas to the immigrating Americans. This angered the Americans wanting to migrate and Americans that already lived in Texas..
After gaining independence from Mexico, Texas wanted to join the United States immediately. The U.S. Congress voted against Texas from joining the Union. Congress was worried that annexation of Texas would anger Mexico, because they had never officially recognized Texas' independence. Congress was concerned that annexation would start a war with Mexico. The possibility of war was not the only deciding factor, if Texas were to become a state, it would be a slave state. At the time, the United States had an even balance between slave and non-slave states. Texas entering the Union would disrupt the balance. Texas declared itself a sovereign country and in 1837 President Andrew Jackson formally recognized Texas a country.
The annexation of Texas was a major player in the United States expansion. The United States wanted to settle in Texas but Mexico supposedly owned the land. That did not matter to the United States and they settled in the area anyway. After the annexation of Texas, Texas also wanted to expand. Texas claimed that New Mexico, California, and to all land north of the Rio Grande were part of Texas. Mexico disagreed and stated the border was at Nueces River. The United States tried to settle matters diplomatically through John Slidell. Slidell tried to buy area known as the U.S. Southwest. Slidell's idea was rejected. This set the stage for the Mexican-American War.