Prior to European colonization, Texas was inhabited by Native American nations such as the Caddo, Comanche and Apache. Spain was the first European country to claim the territory of Texas. Starting in the 1820s, American and European immigrants began arriving in the area. Mexico declared its independence from Spain, and Texas declared its independence from Mexico on March 2, 1836. Following this date, Texas existed as the independent republic for nearly a decade. In 1845, it joined the United States as the 28th state. Texas is one of only four independent states to enter the US federation. Annexation of Texas led the United States to war with Mexico leading to the Mexican Cession. In the American Civil War, Texas was the 7th state to join the Confederate States of America. Near the turn of the 19th century, discovery of oil led to an economic boom in the state. Texas grew rapidly, becoming the second largest state in population 1994, diversifying its economy, with a growing base in high technology.
Texas boasts that "Six Flags" have flown over its soil: the national flags of Spain, the Fleur-de-lis of France, Mexico, the Republic of Texas, the Confederate States of America, and the United States of America.
American Indian tribes who once lived inside the boundaries of present-day Texas include Apache, Atakapan, Bidai, Caddo, Comanche, Cherokee, Kiowa, Tonkawa, Wichita, Hueco and the Karankawa of Galveston. Currently, there are three federally recognized Native American tribes which reside in Texas: the Alabama-Coushatta Tribe of Texas, the Kickapoo Traditional Tribe of Texas, and the Ysleta Del Sur Pueblo of Texas.