In 1845, the United States annexed Texas. However, Mexico still did not recognize its independence or recognize the annexation. The US offered to buy from Mexico the land extending from Texas to the Pacific Ocean, but Mexico wanted to keep the vast area.