The history of Oakland, a city in the county of Alameda, California, can be traced back to the founding of a settlement by Horace Carpentier, Edson Adams, and Andrew Moon in the 19th century. The area now known as Oakland had seen human occupation for thousands of years, but significant growth in the settlements that are now incorporated into the city did not occur until the Industrial Revolution. Oakland was first incorporated as a town in 1852.

Ohlone Period

The earliest known inhabitants were the Huchiun tribe, who had lived there since an unknown date. The Huchiun belong to a linguistic grouping later called the Ohlone (a Miwok word meaning "western people"). Oakland is one of an estimated 425 shellmound sites in the greater Bay Area. Shellmounds, man-made mounds of earth and organic matter built up by humans over thousands of years, were often used as burial locations and/or centers of community life for the local Indigenous population. Only four or so shellmounds are still visible, with many now under modern development. It is believed there is a shellmound under a Burger King in downtown Oakland.

Spanish and Mexican Period

Conquistadors from New Spain claimed Oakland, and other Ohlone lands of the East Bay, along with the rest of California, for the king of Spain in 1772. In the early 19th century, the Spanish crown deeded the East Bay area to Luis María Peralta for his Rancho San Antonio. The grant was confirmed by the successor Mexican republic upon its independence from Spain. Upon his death in 1842, Peralta divided his land among his four sons. Most of Oakland fell within the shares given to Antonio Maria and Vicente.

The Peralta ranch included a stand of oak trees that stretched from the land that is today Oakland's downtown area to the adjacent part of Alameda, then a peninsula. The Peraltas called the area encinal, a Spanish word that means "oak grove". This was translated more loosely as "Oakland" in the subsequent naming of the town, as recounted by Horace Carpentier in his first address as mayor: "The chief ornament and attraction of this city consists, doubtless, in the magnificent grove of evergreen oaks which covers its present site and from which it takes both its former name of 'Encinal' and its present one of 'Oakland. The trees were California live oaks which are the dominant overstory plant of the coast live oak woodland habitat.

Use of Oakland's old-growth redwoods played a major role in the city's early economic history. A redwood forest of approximately five square miles spanned the Oakland hills, with some trees rising to 300 feet. Many of the redwoods were from 12 to 20 feet in diameter, and one was measured at 32 feet. The forest was so prominent that ships entering San Francisco Bay would use it as a navigational landmark.

Initially, small scale logging provided lumber to local ranches and missions. After an export market developed in the 1830s, cutting rose to levels that alarmed the Peralta family, who owned the forest but had permitted non-commercial exploitation by outsiders. Logs would be hauled to the edge of San Francisco Bay, often by routes known today as Redwood Road and Park Boulevard, then shipped across the bay to a rapidly growing San Francisco.

Increasing numbers of adventurers arrived in the 1840s and began logging without regard to the Peralta family or the Mexican authorities. The start of the Gold Rush brought a brief lull to logging as loggers headed to the Sierras in search of gold. But the ensuing building boom increased lumber prices ten- to twenty-fold, and logging soon resumed. For some, cutting trees could more reliably produce a fortune than hunting for ever more elusive gold. Although the 1848 Treaty of Guadalupe Hidalgo that concluded the Mexican-American war had supported existing Mexican legal arrangements, the Peraltas lost control of the forest.

In 1850 the first steam-powered sawmill was erected within the forest, with three more mills added by 1852. By 1853 there were more men cutting redwoods than people living in any East Bay town. By 1860, the entire forest had been obliterated. Today's Redwood Regional Park is much smaller than the original forest, and is populated by much smaller redwoods.

American Appropriation Period As part of the Treaty of Guadalupe Hidalgo following the Mexican–American War, the Mexican government ceded ; 55% of its pre-war territory (excluding Texas) to the US in exchange for $15 million. The Treaty also provided for the safeguarding of the land and property of Mexican citizens. This provision was regularly ignored by squatters and land speculators, some of whom began settling on the Peralta Ranch, particularly during the Gold Rush. Before Congress created a Land Commission in 1851 to pursue a settlement of property claims, a group of three men—Horace Carpentier, Edson Adams, and Andrew Moon—backed at one point by a small army of some 200 men hired from San Francisco, began developing a small settlement on Peralta land initially called "Contra Costa" ("opposite shore", the Spanish name for the lands on the east side of the Bay) in the area that is now downtown Oakland. The United States Post Office recognized this by establishing a post office there with the name "Contra Costa".["Chronology of County's Post Offices", Contra Costa Gazette, November 28, 1958] Carpentier was elected to the California state legislature and got the Town of Oakland incorporated on May 4, 1852. By the time the Land Commission got around to confirming the Peraltas' claims in 1854, Oakland was quickly being further developed. The Peraltas in the meantime had been persuaded to sell various parcels of their vast holdings. In 1853, John Coffee "Jack" Hays, a famous Texas Ranger, was one of the first to establish residence in Oakland while performing his duties as sheriff of San Francisco.

Early American Period On March 25, 1854, Oakland was re-incorporated as the City of Oakland. Horace Carpentier was elected the first mayor. His tenure did not last, however. He was ousted in 1855 by an angry citizenry when it was discovered that he had acquired exclusive rights to the waterfront from the Town Board of Trustees in 1852. Charles Campbell replaced him as Mayor on March 5, 1855.

During the city's early development, the small tidal estuary to the east of downtown had become the city's first sewer, but by the 1860s, the stench had become intolerable. Mayor Samuel Merritt (1867–1869) orchestrated the construction of a dam which raised the estuary's water level and turned it into Lake Merritt.

The city and its environs quickly grew with the railroads, becoming a major rail terminal in the late 1860s and 1870s. In 1868, the Central Pacific constructed the Oakland Long Wharf at Oakland Point, the site of today's Port of Oakland. The Daily Alta California recognized this meant Oakland was to become the "future Jersey City of the Pacific Coast." The Long Wharf served as the terminus both for the Transcontinental Railroad and for local commuter trains of the Central (later, Southern) Pacific. The Central Pacific also established one of its largest rail yards and servicing facilities in West Oakland, which continued to be a major local employer under the Southern Pacific well into the 20th century. The principal depot of the Southern Pacific in Oakland was the 16th Street Station located at 16th and Wood, which is currently being restored as part of a redevelopment project. In 1871, Cyrus and Susan Mills paid $5,000 for the Young Ladies' Seminary in Benicia, renamed it Mills College, and moved it to its current location in Oakland, adjacent to what is now Seminary Boulevard. In 1872, the town of Brooklyn was incorporated into Oakland. Brooklyn, a large municipality southeast of Lake Merritt, was part of what was then called the Brooklyn Township.

A number of horsecar and cable car lines were constructed in Oakland during the latter half of the 19th century. The first electric streetcar set out from Oakland to Berkeley in 1891, and other lines were converted and added over the course of the 1890s. The various streetcar companies operating in Oakland were acquired by Francis "Borax" Smith and consolidated into what eventually became known as the Key System, the predecessor of today's publicly owned AC Transit. In addition to its system of streetcars in the East Bay, the Key System also operated commuter trains to its own pier and ferry boats to San Francisco, in competition with the Southern Pacific. Upon completion of the Bay Bridge, both companies ran their commuter trains on the south side of the lower deck, directly to San Francisco. The Key System in its earliest years was actually in part a real estate venture, with the transit part serving to help open up new tracts for buyers. The Key System's investors (incorporated as the "Realty Syndicate") also established two large hotels in Oakland, one of which survives as the Claremont Resort. The other, which burned down in the early 1930s, was the Key Route Inn, at what is now West Grand and Broadway. From 1904 to 1929, the Realty Syndicate also operated a major amusement park in north Oakland called Idora Park.

Redwoods were harvested from the East Bay Hills for construction in San Francisco, and "Rocky Hill" was purchased by poet Joaquin Miller in 1887. He planted trees, crops, and gardens, hosting thinkers, artists and literary figures from all over the world in "The Hights", which later became a park bearing his name. Tourists flocked from around the world to Miller's "hillside Bohemia".

Early 1900s

The original extent of Oakland, upon its incorporation, lay south of today's major intersection of San Pablo Avenue, Broadway, and Fourteenth Street. The city gradually annexed farmlands and settlements to the east and the north. Oakland's rise to industrial prominence, and its subsequent need for a seaport, led to the digging of a shipping and tidal channel in 1902, which created an island of nearby town Alameda. In 1906, its population doubled with refugees made homeless after the 1906 San Francisco earthquake and fire. Concurrently, a strong City Beautiful movement, promoted by Mayor Frank Kanning Mott, was responsible for creating and preserving parks and monuments in Oakland, including major improvements to Lake Merritt and the construction of Oakland Civic Auditorium, which cost $1M in 1914. The Auditorium briefly served as an emergency ward and quarantine for some of the victims of the 1918 flu pandemic. The three waves of the pandemic killed more than 1,400, out of 216,000, Oakland residents.

By 1920, Oakland was the home of numerous manufacturing industries, including metals, canneries, bakeries, internal combustion engines, automobiles, and shipbuilding.

1920s

The 1920s were economic boom years in the United States as a whole, and in California in particular. Economic growth was fueled by the general post–World War I recovery, as well as oil discoveries in Los Angeles and, most notably, the widespread introduction of the automobile. In 1916, General Motors opened a major Chevrolet automobile factory in East Oakland, making cars and then trucks until 1963, when it was moved to Fremont in southern Alameda County. Also in 1916, the Fageol Motor Company chose East Oakland for their first factory, manufacturing farming tractors from 1918 to 1923. In 1921, they introduced an influential low-slung "Safety Bus", followed quickly by the 22-seat "Safety Coach". Durant Motors operated a plant in Oakland from 1921 to 1930, manufacturing sedans, coupes, convertibles, and roadsters. By 1929, when Chrysler expanded with a new plant there, Oakland had become known as the "Detroit of the West".