Texas (, also locally ; Spanish: Texas, Tejas) is a state in the South Central region of the United States. At 268,596 square miles (695,662 km2), and with more than 29.1 million residents in 2020, it is the second-largest U.S. state by both area (after Alaska) and population (after California). Texas shares borders with the states of Louisiana to the east, Arkansas to the northeast, Oklahoma to the north, New Mexico to the west, and the Mexican states of Chihuahua, Coahuila, Nuevo León, and Tamaulipas to the south and southwest; and has a coastline with the Gulf of Mexico to the southeast.
Houston is the most populous city in Texas and the fourth-largest in the U.S., while San Antonio is the second most populous in the state and seventh-largest in the U.S. Dallas–Fort Worth and Greater Houston are, respectively, the fourth- and fifth-largest metropolitan statistical areas in the country. Other major cities include Austin, the second most populous state capital in the U.S., and El Paso. Texas is nicknamed the "Lone Star State" for its former status as an independent republic, and as a reminder of the state's struggle for independence from Mexico. The "Lone Star" can be found on the Texas state flag and on the Texas state seal. The origin of Texas's name is from the Caddo word táyshaʼ meaning 'friends'.
Due to its size and geologic features such as the Balcones Fault, Texas contains diverse landscapes common to both the U.S. Southern and the Southwestern regions. Although Texas is popularly associated with the U.S. southwestern deserts, less than ten percent of Texas's land area is desert. Most of the population centers are in areas of former prairies, grasslands, forests, and the coastline. Traveling from east to west, one can observe terrain that ranges from coastal swamps and piney woods, to rolling plains and rugged hills, and finally the desert and mountains of the Big Bend.
The term "six flags over Texas" refers to several nations that have ruled over the territory. Spain was the first European country to claim and control the area of Texas. France held a short-lived colony. Mexico controlled the territory until 1836 when Texas won its independence, becoming the Republic of Texas. In 1845, Texas joined the union as the 28th state. The state's annexation set off a chain of events that led to the Mexican–American War in 1846. A slave state before the American Civil War, Texas declared its secession from the U.S. in early 1861, and officially joined the Confederate States of America on March 2 of the same year. After the Civil War and the restoration of its representation in the federal government, Texas entered a long period of economic stagnation.
Historically, four major industries shaped the Texas economy prior to World War II: cattle and bison, cotton, timber, and oil. Before and after the U.S. Civil War, the cattle industry—which Texas came to dominate—was a major economic driver for the state, and created the traditional image of the Texas cowboy. In the later 19th century, cotton and lumber grew to be major industries as the cattle industry became less lucrative. It was ultimately, though, the discovery of major petroleum deposits (Spindletop in particular) that initiated an economic boom which became the driving force behind the economy for much of the 20th century. Texas developed a diversified economy and high tech industry during the mid-20th century. As of 2015, it has the second most Fortune 500 company headquarters (54) in the United States. With a growing base of industry, the state leads in many industries, including tourism, agriculture, petrochemicals, energy, computers and electronics, aerospace, and biomedical sciences. Texas has led the U.S. in state export revenue since 2002, and has the second-highest gross state product. If Texas were a sovereign state, it would have the 10th-largest economy in the world.