San Francisco, California
United States of America


San Francisco, city in western California. Famous for its beautiful setting, San Francisco is built on a series of steep hills located on the northern tip of a peninsula at the entrance to San Francisco Bay. The bay and its extensions, which include San Pablo Bay and Suisun Bay, constitute one of the great natural harbors of the world, embracing nearly 1,200 sq km (more than 450 sq mi) of water. Because of this, San Francisco was once the major Pacific Coast seaport of the United States. Today the city is an important center for finance, technology, tourism, and culture. The city was named after San Francisco Bay, which in turn was named for Saint Francis of Assisi by early Spanish explorers.

Coextensive with San Francisco County, the city of San Francisco is bordered on the west by the Pacific Ocean, on the north by the strait known as the Golden Gate, on the east by San Francisco Bay, and on the south by San Bruno Mountain. San Francisco’s boundaries extend north and east to include Alcatraz, Treasure, and Yerba Buena islands in San Francisco Bay, and to the west to the Farallon Islands, 52 km (32 mi) out in the Pacific Ocean.

The cool waters of the ocean and bay surround San Francisco on three sides, moderating the climate, which is characterized by mild, rainy winters and cool, dry summers. Average daily temperatures in the city range from 5° to 13°C (42° to 56°F) in January and from 12° to 22°C (54° to 72°F) in July. September and October are the warmest months in the city. San Francisco averages 500 mm (20 in) of rainfall per year, most of it coming between November and March. Temperatures rarely fall below freezing and snow is uncommon, although San Francisco is well known for the thick blankets of fog that often cover the city in the summer.

San Francisco and Its Metropolitan Area

San Francisco initially developed as a port city, and its early growth was centered on its waterfront. Almost from the beginning, Market Street has been the central thoroughfare of downtown San Francisco, running from the Ferry Building in the center of the waterfront to the foot of Twin Peaks, a high hill near the city’s center. The Ferry Building was for many years the Cities most famous landmark. Built between 1895 and 1903, it features a 72-m (235-ft) tower designed after a cathedral bell tower in Seville, Spain.

Running inland from the Ferry Building along Market Street and to its north is the Financial District. There modern skyscrapers such as the 48-story Transamerica Pyramid (completed in 1972) and the 52-story Bank of America building (completed in 1969) share the skyline with those from the early 20th century. These skyscrapers house financial institutions, corporate headquarters, and professional offices. West of the Financial District is a shopping district containing major department stores and specialty shops, many of them centered on Union Square. West of Union Square, primarily along Geary Street, is a theater district. Hotels are scattered throughout these last two areas. To the west of these areas is the Tenderloin, a district of inexpensive hotels and low-rent apartments.

There are several distinctive communities north of Union Square. Chinatown has been the center of San Francisco's Chinese community since the 1850s. Its boundaries have expanded significantly since the 1960s, and it is currently one of the largest Chinese communities in the United States. The neighborhoods built on Nob Hill and Russian Hill are generally affluent. Most apartments and condominiums in these neighborhoods are expensive, and because the two hills are very steep, many of them have dramatic views of the bay. Northeast of Russian Hill is North Beach. Once home to many of the Cities Italian immigrants and their children, the area is still known for its numerous Italian restaurants. Just east of North Beach is Telegraph Hill, at the top of which stands Coit Memorial Tower. The tower, a memorial to San Francisco’s fire fighters, is 64 m (210 ft) tall and houses several well-known murals.

Directly north of North Beach are Fisherman's Wharf and Pier 39, areas with many seafood restaurants and tourist-oriented businesses. Nearby are Ghirardelli Square and the Cannery, both former industrial buildings that have been converted into fashionable shops and restaurants, and Hyde Street Pier, with its historic ships.

The area south of Market Street was once a region of warehouses, light manufacturing, and working-class residences. Since the 1970s much of the warehousing and manufacturing has left the region, and some parts of it have been incorporated into the Financial District. The South-of-Market, or SOMA, area also includes museums, an entertainment district, and artistic, high-tech, and multimedia enterprises.

Further south is the Mission District, an area that began to develop in the 1870s as a working-class residential area. Retail shopping in the district is centered along Mission Street. Once home to large numbers of Irish immigrants and their families, the Mission District now houses a vibrant Hispanic community drawn largely from Mexico and Central America. To the west of the Mission District, concentrated along Castro Street, is one of the world's largest and best-known gay and lesbian communities. Parts of the Mission and Castro districts include examples of the late-19th-century Victorian houses for which the city is famous. Many of these houses have been renovated or restored since the 1970s.

The areas west of the city center were long undeveloped because San Francisco’s many hills blocked easy access to them. In the relatively flat area just east of Golden Gate Park, however, the Haight-Ashbury section evolved as a middle- and upper-middle-class residential district between the late 19th and early 20th centuries. In the 1960s it became a center for the hippie movement and then descended into drugs and decay. Since the late 1970s much of the area has been renovated, including many of its Victorian houses.

The Sunset District embraces most of the city west of Twin Peaks and south of Golden Gate Park. Most of the district was built as a middle-class residential area with many single-family row houses (houses that have only a very small space between their side walls). A large part of the Sunset District west of 19th Avenue was built up after World War II (1939-1945). Most of the southwestern part of the city, which includes the Lakeshore and Parkside districts and San Francisco State University, was also developed after World War II. North of Golden Gate Park lies the Richmond District, an area much like the Sunset District but with more multiple-unit residences. Since at least the mid-20th century, parts of the Richmond District have been home to a growing Russian community. In addition, an area along Clement Street in the district emerged as a "New Chinatown" in the last part of the 20th century by virtue of its many Chinese-owned businesses.

Between the Richmond District and the Tenderloin lies the Western Addition, built in the late 19th century as a middle- and upper-middle-class residential district. As families began to move to the suburbs after World War I (1914-1918), the large Victorian houses in the area were divided into apartments. During World War II the Western Addition became home to a large African American community. In the 1950s and 1960s large sections of the area were razed for urban redevelopment. More recently, many Victorian houses have been restored and renovated. Two of the Cities most exclusive neighborhoods, Pacific Heights and the Marina, are north of the Western Addition. Pacific Heights lies along a range of hills, and the Marina is situated between Pacific Heights and the bay.

Until the mid-1930s traveling by land from San Francisco to the eastern side of San Francisco Bay entailed a long journey down the peninsula and up the other side. Travel by water was more efficient, and ferries plied the waters of the bay in all directions from the Ferry Building. Directly across the bay, the cities of Berkeley and Oakland grew up as suburbs, home to many people who commuted to San Francisco by ferry. San Mateo County developed to the south of San Francisco, largely as a series of residential suburbs. At the southern end of the bay, San Jose grew from a small farm town into a city that surpassed San Francisco in population in the 1980s.

Construction of two large suspension bridges in the 1930s tied San Francisco to the mainland, enabling many more people to live outside the city and commute to work. The San Francisco-Oakland Bay Bridge, which opened in 1936, connects San Francisco to the East Bay area. The Golden Gate Bridge, probably the most widely recognized symbol of the city, opened in 1937. It connects San Francisco to Marin County to the north, one of the wealthiest suburban areas in the nation.

With the construction of the Bay and Golden Gate bridges and other links from the city to its suburbs, the San Francisco Bay area has become one large metropolitan region. San Francisco itself is only 122 sq km (47 sq mi) of land area, but the city’s Primary Metropolitan Statistical Area (defined by the Census Bureau as San Francisco, San Mateo, and Marin counties) has a total area of 4,665 sq km (1,801 sq mi).


San Francisco grew rapidly throughout the 19th and early 20th centuries, increasing in population from 57,000 in 1860 to 417,000 in 1910. Although the population leveled off during the 1930s, rapid growth resumed in the following decade, fed by the huge demand for labor by war industries during World War II. By 1950 the population had reached 775,000. After 1950 the Cities population slowly declined as the surrounding suburbs grew. In 2000 the population of San Francisco was 776,733. Some 1.7 million people lived in the three-county San Francisco metropolitan area, and 7 million lived in the Consolidated Metropolitan Statistical Area defined by the Census Bureau as centered on San Francisco, Oakland, and San Jose.

Throughout most of San Francisco's history, the city’s population was largely white. Among the residents were large numbers of European immigrants and their children. In the late 19th century the largest groups in the city were Irish, German, and British. In the early 20th century Italian and Scandinavian groups also became prominent. The population remained more than 90 percent white until World War II, when significant numbers of African Americans moved to the Bay Area to take jobs in shipbuilding and other wartime industries.

The city has long been home to immigrants from Asia and people of Hispanic descent. Some of the ancestors of these residents moved to California in the late 18th and early 19th centuries, when it was a Spanish or Mexican province. Others arrived during the Gold Rush of 1849 or in the early 20th century. With changes in federal immigration law in the 1960s, immigration from Asia, Latin America, and the Pacific Islands began to increase, and many newcomers from those regions settled in San Francisco. Other recent immigrants have come from the Middle East and the former Union of Soviet Socialist Republics, producing significant Arab and Russian communities within the city. By the 1990s San Francisco's population was both racially and ethnically diverse.

According to the 2000 census, whites are 49.7 percent of the people; Asians, 30.8 percent; blacks, 7.8 percent; Native Hawaiians and other Pacific Islanders, 0.5 percent; Native Americans, 0.4 percent; and people of mixed heritage or not reporting race, 10.8 percent. Hispanics, who may be of any race, are 14.1 percent of the population.

From its beginnings, San Francisco has been a heavily Roman Catholic city. Immigration from Europe in the 19th and early 20th centuries brought many Catholics and a large Jewish community; subsequent immigration has not greatly changed those patterns. Smaller religious groups include various Protestant denominations (including many that conduct services in an Asian language or in Spanish), as well as Buddhists, Muslims, and members of Orthodox churches.

Education and Culture

San Francisco is an important center for higher education and culture. The largest university in the city, San Francisco State University, is part of the California State University system. It had an enrollment of more than 27,000 students in 1998, almost one-quarter of them at the graduate level. Other important schools are the University of California at San Francisco, which is a well-known medical school and medical research center; Golden Gate University; and the University of San Francisco, a Jesuit institution. City College of San Francisco is one of the nation's largest community colleges. It had a total enrollment of more than 90,000 students a year in the late 1990s. San Francisco is also home to several institutions of higher education that specialize in the arts, including the San Francisco Conservatory of Music and a satellite campus of the California College of Arts and Crafts.

San Francisco has a wide variety of cultural institutions. The San Francisco Opera, which plays at the War Memorial Opera House in the Civic Center, features well-known artists. The internationally acclaimed San Francisco Symphony plays in nearby Davies Symphony Hall. The San Francisco Ballet, which also performs at the Opera House, is the oldest professional ballet company in the United States and has established a strong national reputation. A wide range of other music is performed at various halls and clubs. San Francisco musicians made important contributions to jazz, primarily following World War II, and to rock music, especially in the 1960s when groups such as the Jefferson Airplane and the Grateful Dead defined a San Francisco sound. The American Conservatory Theater, whose home is the Geary Theater, is probably the best known of a number of theater companies. The company’s performances range from lavish Broadway-type productions to experimental theater.

San Francisco is home to many important museums. The M. H. de Young Memorial Museum, in Golden Gate Park, specializes in American art. The California Palace of the Legion of Honor, in Lincoln Park, is known for its collection of European art. The Asian Art Museum of San Francisco is one of the largest museums in the world devoted to the arts and cultures of Asia. Currently located in Golden Gate Park, the museum is scheduled to move to the Civic Center downtown in 2001.

In 1995 the San Francisco Museum of Modern Art moved into a dramatic new building designed by Swiss architect Mario Botta. The building is one of the largest structures in the United States devoted to modern art. The area around the museum is rapidly developing into a major cultural center and includes the Yerba Buena Center for the Arts, the California Historical Society, and the Ansel Adams Center for Photography.

The Mexican Museum, which houses a collection of Mexican folk art, is one of four museums located in Fort Mason Center, northwest of downtown on San Francisco Bay. The center is part of the Golden Gate National Recreation Area. The other three are the gallery of the San Francisco African American Historical and Cultural Society, which exhibits African-American materials; the San Francisco Craft and Folk Art Museum, with extensive exhibits of craft and folk are from many different cultural backgrounds; and the Museo ItaloAmericano, which displays Italian and Italian American art.

The California Academy of Sciences in Golden Gate Park is one of the largest museums of natural history in the world. The Strybing Arboretum & Botanical Gardens, also in Golden Gate Park, is a living museum of plants. The Exploratorium, housed in the Palace of Fine Arts in the Golden Gate National Recreation Area, is an innovative science museum that features hands-on exhibits.

Several San Francisco museums offer exhibits on the rich history of the city and the West. The San Francisco Maritime National Historical Park, located at the west end of Fisherman’s Wharf, includes exhibits, a fleet of historic ships at the Hyde Street Pier, a library, and an archive. The Fort Point National Historic Site is a Civil War-era fort under the south end of the Golden Gate Bridge. The Presidio, a former military post on the northern edge of the city, is part of the Golden Gate National Recreation Area. It includes several historical sites as well as wooded open space. Mission Dolores, located in the Mission District, dates from the earliest Spanish occupation of the Bay Area.

The California Historical Society provides exhibits, a library, and a large research archive. Other important research collections are to be found at the University of California at San Francisco, San Francisco State University, the University of San Francisco, the San Francisco Public Library, the National Archives branch in San Bruno, and the Sutro Library, a branch of the California State Library.

The diversity of San Francisco’s population is reflected in the large number of cultural organizations devoted to particular groups, such as the Chinese Historical Society and the Irish Cultural Center. Many groups sponsor annual parades or festivals in conjunction with ethnic holidays, including Chinese New Year (January or February), Saint Patrick's Day (March), and the Italian Heritage Parade and Festival (October). Carnaval, a Mission District parade and celebration that includes many groups, especially Hispanics, is held in May. The Juneteenth festival in June features a parade celebrating African American heritage. Other major festivals include the Lesbian/Gay/Bisexual/Transgender Pride Celebration Parade (June) and Fleet Week, which takes place during a visit by U.S. naval vessels in autumn.


In addition to its important cultural resources, San Francisco has many recreational and entertainment attractions. Golden Gate Park is one of nation's great urban parks, stretching for 5 km (3 mi) between the Sunset and Richmond districts. Established in 1870, it houses the M. H. de Young Memorial Museum, the California Academy of Sciences, the Asian Art Museum of San Francisco, and Strybing Arboretum & Botanical Gardens. The park also features the famous Japanese Tea Garden (dating from 1894) and elaborate landscaping and plantings. The AIDS Memorial Grove, a 6-hectare (15-acre) wooded area of the park, was designated in 1996 as a national landmark to memorialize victims of acquired immunodeficiency syndrome (AIDS). Other parks in San Francisco range from tiny squares of green in the midst of apartment buildings to the large open spaces of McLaren, Buena Vista, and Lincoln parks. None of the Cities other parks can match Golden Gate Park in size or facilities, however.

In 1972 the U.S. government created the Golden Gate National Recreation Area. It now includes some 30,277 hectares (74,816 acres) of land and water embracing city, county, state, and federal parklands in three counties. Far larger than the city of San Francisco, the recreation area is the largest urban national park in the world. Nearly 20 million visitors visit the park each year, making it one of the most popular federal recreational facilities. Among its attractions are Muir Woods National Monument, which is located north of the Golden Gate on the coast and features old-growth redwood trees; Alcatraz Island, which is an abandoned federal penitentiary that once held gangster Al Capone; and many beaches.

The San Francisco 49ers, the Cities professional football team, play in the Stadium at Candlestick Point in the southeast corner of the city. The San Francisco Giants, the Cities professional baseball team, play in Pacific Bell Park, which is located near downtown San Francisco just south of the Bay Bridge.


San Francisco emerged as an important shipping and manufacturing center during the mid-19th century, when the Gold Rush of 1849 brought wealth to the area and caused the city’s population to skyrocket. For more than 100 years, the city’s economy was centered on its waterfront. Products from California and the West were loaded onto ships bound for the eastern United States or other parts of the world, and goods from the eastern United States, Europe, Hawaii, Japan, and around the Pacific were unloaded. The city became an important center of manufacturing, producing sugar, canned fruits and vegetables, flour, beer, printed goods, clothing, and furniture. San Francisco’s foundries and machine shops made a variety of metal products, including locomotives, large-scale farm equipment, ships, and some of the world’s most advanced mining equipment.

The importance of the port in San Francisco’s economy has declined, especially since the advent of containerized shipping in the 1960s and 1970s. Around that time most traffic moved to other ports because San Francisco did not have sufficient space for the large open areas required for a container port. Oakland is now the major port in the Bay Area. A similar transformation occurred after World War II in San Francisco's manufacturing sector, as many companies moved their operations to less expensive locations. As a result, manufacturing is of limited importance in the city today. The remaining major industries include food processing, clothing manufacturing, and printing and publishing.

Though its importance as a shipping and manufacturing center has declined, San Francisco has remained a leading financial and business center. The Federal Reserve Bank for the 12th District and the headquarters of Wells Fargo & Company are in San Francisco. Corporate headquarters for a variety of companies, including some of the world's leaders in their fields, are also located here, notably the construction company Bechtel and apparel manufacturer Levi Strauss & Co. Commerce and tourism are other important economic activities. By the 1990s the largest proportion of the city’s workforce was classified as service sector, accounting for 88.5 percent of the total and embracing a wide variety of occupations, from bank presidents to janitors. Among those in the service sector, finance, insurance, and real estate accounted for about one-eighth of the workforce, and roughly two workers in five were employed in either the hotel and restaurant industry or in business services.

In the second half of the 20th century the region south from San Francisco to San Jose acquired the name Silicon Valley as a tribute to its key role in the emergence of the personal computer, software, biotechnology, and other high-technology industries. Important hardware and software innovators developed there, including Apple Computer, Inc., Cisco Systems, Inc., Hewlett-Packard Company, Netscape Communications Corporation, and 3Com Corporation, along with biotechnology leaders such as Genentech, Inc. These developments just down the peninsula had a major impact on San Francisco as well. During the 1990s, one part of the South-of-Market area became home to so many multimedia companies that it acquired the nickname Multimedia Gulch. In addition, venture capital firms specializing in high-technology start-up companies have located in San Francisco as well as in Silicon Valley.

For much of the 20th century, San Francisco had a reputation for being a place where, in the words of a journalist in 1904, "unionism holds undisputed sway." However, changes in the Cities economy have greatly reduced the numbers of workers in unionized manufacturing or maritime jobs. In the 1970s unionization increased among teachers, health-care workers, and public employees, but the overall proportion of union members in the workforce has declined.

The city of San Francisco has had a highly developed system of public transit since its early years. The cable car was invented in San Francisco in 1873 as a way to provide efficient transportation on the Cities steep hills. Cable cars are pulled along by cables that run underneath the streets. In the early 20th century, privately owned streetcar lines served nearly every neighborhood in the city. In 1912 the city launched its first municipally owned streetcar line—also the first in any major city—marking the beginning of the Municipal Railway, known as the Muni. Eventually the Muni bought out the privately owned lines and merged them into its system. The Muni now operates a variety of electric streetcars (both modern light-rail vehicles and vintage streetcars from the 1930s), cable cars, electric trolley buses, and diesel buses. With some 216 million riders each year, the Muni is one of the largest transit systems in the nation. More than a third of San Francisco’s workforce commutes using public transit.

In 1972 the Bay Area Rapid Transit system (BART), a light-rail system that ties the East Bay to San Francisco via a tunnel underneath San Francisco Bay, opened. BART now carries more than 75 million passengers annually. CalTrain, a rail line that connects San Francisco and the suburbs to its south, carries some 8 million passengers each year. The bay area is also served by San Francisco International Airport, one of the busiest in the nation.


San Francisco has been the only combined city and county government in California since 1856. Legislative powers are vested in an 11-member board of supervisors, which acts as both city council and county board. The supervisors are popularly elected to four-year terms. They were elected at-large until 2000; that year, under a revision to the city’s charter, 11 districts were created for the purpose of supervisorial elections. The supervisors serve overlapping terms, with five or six elected every two years. The candidate who receives the largest number of votes becomes the presiding officer of the board for the next two years and has the power to appoint committees and set agendas. Supervisors are limited to two terms.

The mayor is popularly elected to a four-year term. He or she appoints a broad range of city officials, including the city administrator, the controller, and members of commissions and boards. The mayor prepares an annual budget for submission to the board of supervisors and can veto items approved by the board. The mayor is limited to two terms.

The city administrator serves a five-year term and is responsible for administrative services, waste disposal, and public works. The controller, who serves a ten-year term, is the Cities chief fiscal officer, responsible for disbursing funds and auditing departmental finances. Commissions are responsible for matters such as supervising the airport, city planning, the fire and police departments, parks and recreational facilities, the port and waterfront, public housing, the public library, public transportation, public utilities, and social services.

San Francisco is a part of several regional governmental bodies. Established in the 1950s, the Bay Area Rapid Transit (BART) district includes Alameda, Contra Costa, San Francisco, and San Mateo counties and is responsible for the BART system. The Association of Bay Area Governments was established in 1961 as the official planning agency for the Bay Area, covering some 100 cities and nine counties. The San Francisco Bay Conservation and Development Commission regulates developments along San Francisco Bay. The Golden Gate Bridge, Highway and Transportation District, which includes San Francisco and five counties to its north, manages the Golden Gate Bridge and runs ferry and bus systems designed to reduce automobile traffic over the bridge. The San Francisco Bay Area Air Quality Management District takes in all of the seven counties that border the bay and parts of two more. Its aim is to reduce air pollution.

Contemporary Issues

The people of San Francisco can take pride in their Cities accomplishments. San Franciscans, and in some cases their counterparts in the Bay Area, have successfully undertaken mammoth construction projects such as the San Francisco-Oakland Bay Bridge, the Golden Gate Bridge, and the Bay Area Rapid Transit system. Since at least the 1950s, San Franciscans have also earned a reputation for tolerance of and respect for diversity. Despite such accomplishments, the city faces both infrastructural and social problems.

During the late 1990s the greatest problem in San Francisco’s infrastructure was the Municipal Railway. Proportionately more San Franciscans rely on public transportation than do the people in any other California city, but riders complained of serious delays and overcrowding. Some improvements were underway by 1999, and in that year city voters also approved major changes in the organizational structure of the city’s transportation departments.

The most serious social problems facing the city are not unique to San Francisco, but some have taken on greater dimensions in the city than they have elsewhere. One such problem is homelessness. During the administration of Mayor Art Agnos from 1988 to 1992, the plaza in front of city hall became an encampment for homeless people, rendering other use impossible and raising public health concerns. Agnos's political opponents dubbed it "Camp Agnos," and the situation contributed to Agnos's defeat in 1991. The problem of homelessness persists despite the efforts of city agencies and private charities to provide shelter, health care, and drug, alcohol, and mental health treatment. In the mid- and late 1990s mayors Frank Jordan and Willie Brown both sought to discourage homeless people from living in public space in the downtown area and, in Brown's case, in Golden Gate Park. However, residents of other areas complained that because of these projects, the displaced homeless had moved into their neighborhoods.

In other areas the city has made some progress toward addressing social problems. As was true across much of the nation, the crime rate in San Francisco dropped in the 1990s, as did the rate of drug-related violence. In addition, some public housing projects in San Francisco that were especially prone to violence and drug-related activity were razed and rebuilt with designs considered less likely to encourage those activities. Other public housing projects received stepped-up security patrols.

Some social critics have pointed to an increasing economic and social polarization of San Francisco's population. Those who work in finance or high-tech fields are increasingly affluent, pushing rents and home prices to among the highest levels in the nation. At the same time, people who labor in the service sector often work for the minimum wage, cannot share the affluent lifestyles around them, and are hard-pressed to afford rising rents. The disappearance of many unionized jobs in manufacturing and on the waterfront may have contributed to a reduction in opportunities for well-paying jobs for those without college degrees. This economic polarization coincides in part with ethnic and educational patterns. Workers in the low-wage end of the service sector (including many hotel and restaurant workers and many business service workers) are likely to have limited English proficiency and a high-school education or less; many workers in those areas are also disproportionately African American and Hispanic. By contrast, those people who work in the finance and high-tech sectors are more likely to be white or Asian American and to have one or more college degrees.


Before the arrival of the first Europeans, the Bay Area was inhabited by people whom the Spanish called Costeños, or “coast people.” Subsequent anthropologists called them Costanoans. They may have called themselves Ohlone. There were probably 7,000 of these people in the Bay Area in the mid-1700s living in 70 to 80 small villages. They hunted deer and small game, fished, and gathered seeds, acorns, and shellfish. Huge mounds of shells marked the outskirts of their villages, testimony to the central place of shellfish in their diets and to the centuries they had lived there.

After the Spanish conquered the Aztec Empire in 1519, they slowly pushed their control to the west and north, discovering Baja California in 1533 and sending ships north along the coast in the 1540s. Although they named and claimed California, they did nothing to settle the region. After Russia began sending expeditions into the northern Pacific in the mid-1700s, the governor of New Spain (which at that time included Spanish islands in the Caribbean, most of Central America, Mexico, and California) ordered settlements to reinforce Spain's territorial claims. In 1776 a military outpost and mission were established near San Francisco Bay, which had been named for Saint Francis of Assisi by Spanish explorers several years earlier.

The Spanish military post, located toward the eastern part of what is now the Presidio, was intended to guard the entrance to the bay. Although officially named for Saint Francis of Assisi, the mission was usually called Mission Dolores because of its location near the Laguna de Nuestra Señora de los Dolores (Lake of Our Lady of Sorrows). Most of the Native American inhabitants of the region fled when the Spanish arrived. Throughout the history of Spanish San Francisco, the fort was a poorly supplied outpost on the remote reaches of the imperial frontier.

Spanish authority gave way to that of Mexico in the 1820s. Under Mexican rule, large ranches were established, including several in what is now San Francisco. Californios—as the Mexican residents of California were called—developed a brisk trade in cattle hides and tallow with ships from New England that increasingly appeared along the coast. Since the 1790s the bay had also attracted other British and American ships that needed to replenish their supplies. In 1835 the village of Yerba Buena was established to trade with the ships that came to the bay. The population of the new village was ethnically diverse from the beginning. Residents included not only Californios, but also immigrants from other lands who had converted to Catholicism and became Mexican citizens to get land grants.

American policymakers had long eyed San Francisco Bay, and President Andrew Jackson tried unsuccessfully to buy the region from Mexico in 1835. In 1846 the United States declared war on Mexico in a dispute over the Mexico-Texas border. On July 9, 1846, soon after war was declared, the U.S. Navy ship Portsmouth entered the bay and claimed California for the United States. Washington Bartlett, a lieutenant on the Portsmouth, took over as Yerba Buena’s alcade, a position similar to that of mayor. A few months later, in January 1847, Bartlett changed the name from Yerba Buena to San Francisco, naming the town after the bay. A bit more than a year later the little village, numbering some 800 people, heard the news that gold had been discovered in the California interior.

The Gold Rush of 1849 quickly transformed northern California, including San Francisco. Thousands of fortune seekers began to arrive, the first by ship early in 1849. The village grew from 800 to 8,000 in a year, then to 35,000 by 1852. By 1860 San Francisco had 57,000 residents and was the 15th largest city in the United States.

San Francisco, the major Pacific Coast port, quickly became the region's commercial and financial center. Gold poured into the vaults of San Francisco's banks, as did silver from Nevada after 1859. The banks financed economic development throughout the West in the form of railroads, steamship lines, cattle ranches, iron foundries, mines, wineries, and other ventures. San Francisco emerged as an important center of manufacturing. Mining, banking, railroads, and other enterprises produced a host of wealthy entrepreneurs, many of whom built extravagant mansions atop Nob Hill. By 1900 San Francisco was the ninth largest city in the nation.

Between 1848 and 1900 San Francisco experienced not only rapid population growth and economic development, but also patterns of politics that set it apart from the cities of the eastern United States. Twice in the troubled 1850s the new community's businessmen formed Committees of Vigilance, aimed at what they considered serious lawlessness that the legal authorities seemed unable or unwilling to control. The first committee hanged 4 men and banished 14; the second also hanged 4 and banished more than 30.

The 1890s marked an era of reform in San Francisco city government, led by James D. Phelan, who won election as mayor in 1896 and pushed through a new city charter. In 1901 the use of city police in a long and violent strike by teamsters and maritime workers produced a new political party, the Union Labor Party (ULP). Pledging to keep city government neutral during labor disputes, the new party elected its candidate for mayor in 1901 and 1903 and swept most city offices in 1905. The following year, the mayor and the majority of the members of the board of supervisors were indicted for corruption and were removed from office.

On April 18, 1906, an earthquake estimated at 7.7 to 7.9 on the Richter scale rocked San Francisco, killing hundreds of people as it destroyed buildings, toppled trees, twisted streets, and broke gas and water lines. Fires broke out and developed into a firestorm. Without water, firefighters dynamited buildings to create a firebreak and stop the fire from spreading. The last flames were not extinguished until April 21. The earthquake and fire destroyed 28,000 buildings, including the homes of three-quarters of the Cities population. More than 3,000 people died in the earthquake and its aftermath.

San Franciscans quickly set about rebuilding their city. Mayor James Rolph, elected in 1911 in the Cities first nonpartisan election, led efforts to build a magnificent City Hall and Civic Center, the Municipal Railway, and a new city water system based on damming the Hetch Hetchy Valley in the Sierra Nevada. As the rebuilding neared completion, civic leaders planned a great international exposition to celebrate the opening of the Panama Canal and, unofficially, to demonstrate the Cities phoenix-like recovery from the devastation of the earthquake and fire. The Panama-Pacific International Exposition opened in February 1915. Nineteen million visitors toured the exhibit grounds, which were built on former marshlands that had been filled for the exhibition. The grounds were later developed as a residential district known as the Marina.

During the first few years following the end of World War I (1914-1918), San Francisco employers launched an effort to break the power of unions, as did employers across the country. Under the leadership first of the Chamber of Commerce and later of the Industrial Association, they broke some of the Cities oldest unions, and they rendered others powerless throughout most of the 1920s. As a result of the nationwide depression that began in 1929 and the reforms of President Franklin Roosevelt's New Deal beginning in 1933, labor organizations revived in San Francisco. In 1934 the city was at the center of a three-month strike by longshoremen all along the Pacific Coast that shut down most shipping. When the Industrial Association tried to open the port of San Francisco on July 5, using strikebreakers under police protection, a daylong battle broke out between strike supporters and police, leaving two strike supporters dead. Governor Frank Merriam dispatched the National Guard, armed with tanks and machine guns, to guard against further violence, and in the process, to permit the reopening of the port using strikebreakers. In the meantime, union after union voted to join a general strike intended to shut down the city in protest against the killings and the use of the National Guard. The general strike began on July 16 and lasted four days. Both sides claimed victory, but the strike forever changed labor practices along Pacific Coast waterfronts. It also led to the creation of the International Longshore and Warehouse Union in 1937. By the late 1930s San Francisco was once again a highly unionized city.

After the Japanese attack on Pearl Harbor in December 1941, the United States joined World War II on the side of the Allies. San Francisco became a major embarkation point for troops headed for the Pacific, and San Francisco Bay emerged as a major shipbuilding center. Shipyards sprang up or expanded all around the bay, and by 1944 they were producing one-quarter of all the ships built in the United States. The population of the region boomed as employers desperately sought labor all across the nation. For the first time, significant numbers of African Americans moved to San Francisco, drawn by the promise of work in shipyards or other war industries. Although labor was in such great demand, the federal government ordered the evacuation and internment of all Japanese Americans in the Pacific Coast states, emptying San Francisco's Japantown. At the end of the war, representatives of the 50 nations fighting against Germany, Japan, and Italy converged on San Francisco for the founding conference of the United Nations.

During the 1950s and 1960s San Francisco politics saw the slow emergence of a liberal political coalition that brought together organized labor, ethnic minorities, and entrepreneurs promoting urban growth. This coalition laid the foundation for liberal domination of the city government from the mid-1960s onward, notably during the mayoral administration of Joseph Alioto from 1968 to 1976. San Franciscans were horrified in 1978 when Alioto's successor, George Moscone, was assassinated along with Harvey Milk, the first openly homosexual member of the board of supervisors. The assassin was Dan White, a former policeman and fireman who had been elected to the board of supervisors and who blamed Moscone and Milk for his political failures. Dianne Feinstein succeeded Moscone as mayor and served until 1987.

A sustained downtown building boom of the 1960s and 1970s raised increasing concerns about the "Manhattanization" of San Francisco, and in 1986 the citizens voted to limit future high-rises. The Loma Prieta earthquake of 1989 produced significant damage in some parts of the city, caused part of the Bay Bridge to collapse, and destroyed a large section of freeway in Oakland. Centered south of San Francisco, near Santa Cruz, the quake measured 7.1 on the Richter scale. It killed 62 people and injured almost 4,000.

San Francisco gained a reputation in the 1950s for being tolerant of social and cultural groups that often met hostility elsewhere. In the 1950s it was the beatniks who attracted attention, and in the 1960s it was the hippies. Throughout both of these decades a growing gay and lesbian subculture had been developing that increasingly refused to accept discrimination. In the 1970s the homosexual movement seized headlines with the election of Harvey Milk to the board of supervisors. Changes in federal immigration laws in the 1960s encouraged substantial numbers of new immigrants, and the Cities population rapidly became more diverse. In 1995 Willie Brown became the city’s first black mayor; he was reelected in 1999. Early in the 21st century, San Francisco was well known not only for its beauty and culture, but also for its social and ethnic tolerance and diversity.