Texas was annexed by the United States in 1845 and became the 28th state. Until 1836, Texas had been part of Mexico, but in that year a group of settlers from the United States who lived in Mexican Texas declared independence. ... The annexation of Texas contributed to the coming of the Mexican-American War (1846-1848)