The earliest archaeological evidence of human settlements in the Bay Area dates back to 8000–10,000 BC. The oral tradition of the Ohlone and Miwok people suggests they have been living in the Bay Area for several hundreds if not thousands of years. The Spanish empire claimed the area beginning in the early period of Spanish colonization of the Americas. The earliest Spanish exploration of the Bay Area took place in 1769.
The Mexican government controlled the area from 1821 until the 1848 Treaty of Guadalupe Hidalgo. Also in 1848, James W. Marshall discovered gold in nearby mountains, resulting in explosive immigration to the area and the precipitous decline of the Native population. The California Gold Rush brought rapid growth to San Francisco. California was admitted as the 31st state in 1850. A major earthquake and fire leveled much of San Francisco in 1906.
During World War II, the Bay Area played a major role in America's war effort in the Asiatic-Pacific Theater, with the San Francisco Port of Embarkation, of which Fort Mason was one of 14 installations and location of the headquarters, acting as a primary embarkation point for American forces. Since then, the Bay Area has experienced numerous political, cultural, and artistic movements, developing unique local genres in music and art and establishing itself as a hotbed of progressive politics.
Economically, the post-war Bay Area saw large growth in the financial and technology industries, creating an economy with a gross domestic product of over $700 billion. In 2018 it was home to the third-highest concentration of Fortune 500 companies in the United States.