Spanish missionaries were the first European settlers in Texas, founding San Antonio in 1718. Hostile natives and isolation from other Spanish colonies kept Texas sparsely populated until following the Revolutionary War and the War of Mexican Independence, when the newly established Mexican government began to allow settlers from the U.S. to claim land there. This led to a population explosion, but dramatically reduced the percentage of the population with Mexican heritage, causing friction with the government in Mexico City. After several smaller insurrections, the Texas Revolution broke out, and the state became an independent nation in 1835. However, the newly formed Texas Republic was unable to defend itself from further incursions by Mexican troops, and eventually negotiated with the U.S. to join the union in 1845.