On Jan. 28, 1969, 3 million gallons of crude oil from an oil rig explosion fouled 35 miles of coast near Santa Barbara. Images of oiled birds and distraught coastal residents scrubbing rocks and shoveling sandy clumps of crude into barrels played for weeks on the nightly TV news across the nation. Fifty years later, we can trace how that one environmental crisis gave rise to an ethos baked into Californians’ consciousness. One that shapes our institutions, our attitudes and our state’s relationship with Washington, D.C.

Until that day, Californians, like most Americans, saw oil, gas, timber, mining — industries reliant on extracting natural resources from Earth — as activities necessary to keep our factories running and people employed, but gave little thought to their effect. “The Santa Barbara oil spill made it clear what the costs of not thinking about the environment are,” said Holly Doremus, a professor of environmental law at UC Berkeley.

Overnight, California’s magnificent 1,100-mile coastline went from a much-loved destination to a threatened public treasure. In less than a decade, the Legislature and voters passed a series of laws and regulations to safeguard the quality of the environment, protect the shoreline, establish a moratorium on offshore oil drilling and enact a coastal protection plan.

Within weeks of the spill, the State Lands Commission passed a moratorium on leasing state offshore oil tracts. In 1994, the Legislature prohibited any new oil leases on state offshore tracts. When President Trump promised last fall to expand oil drilling on federal tracts (located more than 3 miles from the California coast), the Legislature passed and Gov. Jerry Brown immediately signed two bills that would prohibit oil pipelines from crossing into state waters, thus making is unprofitable to move oil from federal waters to onshore refineries. But it was the decades-old law that gave the governor leverage over Trump’s plans (although the courts will hand down the final verdict).

Within two years of the spill, coastal activists circulated and then qualified for the ballot an initiative, citing two issues: the horrifying effects of oil washing up on pristine beaches and a worrisome pattern of private oceanfront development. Over time, they predicted, more beach cottages and sea-cliff homes would wall off the coast from the general public. Despite being outspent $100 to $1 by opponents, the measure passed in 1972. The Legislature made it permanent four years later by passing the Coastal Act. That initiative created and the act outlined the jurisdiction of a new and powerful state institution: the California Coastal Commission.

The Coastal Commission oversees local plans to conserve coastal lands and resources and ensure California’s beaches are open to everyone. Enshrined in the Coastal Act is the idea that coastal lands belong to us all to cherish, enjoy — and protect.

The powers of the commission and the durability of the Coastal Act are constantly challenged. A recent example was efforts (unsuccessful) by a Silicon Valley titan and coastal landowner to close Martins Beach in San Mateo to the public.

Curiously enough, the Santa Barbara spill didn’t prompt a legislative response to ocean pollution. “It took a later spill, in Orange County, to do that (the 1990 Lempert-Keene-Seastrand Oil Spill Prevention and Response Act,” noted Rick Frank, who was a student at UC Santa Barbara in 1969 and today directs an environmental law center at UC Davis.

The Santa Barbara oil spill unified an entire generation under a banner of environmental concerns. It prompted UC Santa Barbara to establish the first environmental studies program, the germ of what is now an international field of academic study. Lessons first taught there have helped develop environmental sensitivities that shape law, life and politics in California, and the world. “The spill changed the political conversation in ways that have really lasted,” Frank said.

Will the Wine Country and Camp fires galvanize the public around climate change in the way the Santa Barbara oil spill initiated an era of environmental defense? That’s still unclear, but if it happens anywhere soon, it’s likely to be here in California.

This commentary is from The Chronicle’s editorial board. We invite you to express your views in a letter to the editor. Please submit your letter via our online form: SFChronicle.com/letters.