sentences:  Following the war a Republic of Texas was declared, though independence was not recognized by Mexico, and the boundaries between the two were never agreed upon.In 1845 the United States annexed Texas, leading to a major border dispute and eventually to the Mexican–American War.The Mexican–American War was fought from 1846 to 1848.