The working-class city of Oakland, Calif., wants to stop trains carrying crude, coal, and petroleum coke from reaching local refineries and export terminals.

The city council voted unanimously on Tuesday evening to “oppose” the “transportation of hazardous fossil fuel materials” along existing rail lines and through “densely populated” and waterfront areas — which includes much of the city.

The city will now formally urge California and regional governments to take action on oil-train safety, and will consider formally opposing projects that threaten to bring fossil fuel–bearing trains into Oakland.

Lawmakers in the Californian cities of Davis and Berkeley have passed similar resolutions that attempt to block oil trains. San Francisco is considering something similar too. Tuesday’s vote was particularly significant, given that Oakland operates a large port, which has recently been rejecting coal industry efforts to use its terminals for exports. Like Berkeley and San Francisco, Oakland, which is also in the Bay Area, is located close to major oil refineries, some of which are being expanded.

Grist thanks its sponsors. Become one.

Local governments up and down the West Coast have been voting to keep coal-carrying trains out of their communities, aiming to protect themselves from coal-dust pollution and to prevent coal mined in the Intermountain West from reaching power plants in Asia.

Secrecy by railway operators makes it difficult for anybody in Oakland, or in any other city that’s home to an extensive rail network, to know for sure whether crude oil is being hauled through their communities. But oil trains are increasingly common in California and other states, as drillers in Canada, North Dakota, and other parts of the U.S. turn to rail cars to move their products to refineries.

The morning after Oakland’s vote, the Natural Resources Defense Council published results of a new analysis revealing that nearly 4 million residents in California’s Bay Area and Central Valley could be in danger should an oil train be involved in an accident. The NRDC found that crude-by-train deliveries spiked in California to 6 million barrels last year — up from a mere 45,000 barrels in 2009.

Grist thanks its sponsors. Become one.

Local ordinances probably won’t be effective in limiting rail transportation of fossil fuels. Industry argues that only the federal government has the legal right to regulate such shipments. Unfortunately, the feds are doing a shoddy job of it.

“There’s a question over the ability of cities, or anyone else, to regulate the railways, if that entity is not the federal government,” said Roger Lin, a staff attorney for the nonprofit Communities for a Better Environment, which advocated for Tuesday’s vote. “But I feel that if as many cities as possible do this, it sends a great message — a very positive message — to the federal government.”

As if to truly sink the boot into the bloated body of the fossil-fuel industry, the Oakland City Council also approved a fossil-fuel divestment bill Tuesday night. Among other things, the city will now urge its pension funds to dump their dirty-energy stocks.