San Francisco was founded on June 29 , 1776 , when colonists from Spain established Presidio of San Francisco at the Golden Gate and Mission San Francisco de Asís a few miles away , all named for St. Francis of Assisi . The California Gold Rush of 1849 brought rapid growth , making it the largest city on the West Coast at the time . San Francisco became a consolidated city-county in 1856 . San Francisco 's status as the West Coast 's largest city peaked between 1870 and 1900 , when around 25 % of California 's population resided in the city proper . After three-quarters of the city was destroyed by the 1906 earthquake and fire , San Francisco was quickly rebuilt , hosting the Panama-Pacific International Exposition nine years later . In World War II , San Francisco was a major port of embarkation for service members shipping out to the Pacific Theater . It then became the birthplace of the United Nations in 1945 . After the war , the confluence of returning servicemen , significant immigration , liberalizing attitudes , along with the rise of the " hippie " counterculture , the Sexual Revolution , the Peace Movement growing from opposition to United States involvement in the Vietnam War , and other factors led to the Summer of Love and the gay rights movement , cementing San Francisco as a center of liberal activism in the United States . Politically , the city votes strongly along liberal Democratic Party lines
1906 earthquake and fire
1906 San Francisco earthquake
San Francisco