Texas, famously known as the "Lone Star State" due to its past as an independent nation, is the second-largest U.S. state by both area and population, with over 31 million residents as of 2024. After being claimed by Spain and then Mexico, Texas gained independence in 1836 as the Republic of Texas, subsequently joining the United States in 1845, a pivotal event leading to the Mexican-American War. Its economic landscape dramatically evolved from historical industries like cattle and cotton, with the discovery of major petroleum deposits, particularly at Spindletop, sparking a significant 20th-century boom. Today, Texas boasts a highly diversified economy, leading in energy, aerospace, high tech, and agriculture, and hosts 52 Fortune 500 companies. With Austin as its capital, and major metropolitan areas like Dallas–Fort Worth and Greater Houston, the state consistently ranks high in business growth and U.S. export revenue, encompassing a vast and varied geography from Gulf Coast swamps to western deserts.