However, the United States inherited the southern and western border-disputes with Mexico, which had refused to recognize Texas's independence or to accept U.S. offers to purchase the territory. Consequently, the annexation led to the Mexican–American War (1846–1848).