As a noisy fracking debate unfolded in recent years, California quietly added another new, and potentially risky, supplier of crude oil: railroads.

California experienced a catastrophic oil rig blowout off Santa Barbara in 1969, and the state has planned for an Exxon Valdez-style disaster for years.

Today, with a half-dozen new rail terminals proposed, at least two of them in the Bay Area, state officials must expand their focus to preventing rail disasters such as the explosion of an oil-laden train that flattened a town in Quebec last year.

Oil imports are nothing new in California.

Despite a productive oil patch of its own, the Golden State has long relied on Alaska and foreign suppliers, principally Saudi Arabia, to meet demand. Imported oil accounts for almost two-thirds of the crude refined in California, up from about 50 percent in the mid-1990s.

That imported oil is increasingly likely to arrive on a long-haul train crossing the Sierra Nevada rather than a supertanker navigating the Pacific.

Crude-by-rail imports went from virtually zero in 2009 to 2.83 million barrels in the last three months of 2013, with the total doubling between the third and fourth quarters alone, according to figures compiled by the state Energy Commission. The proposed terminals reflect industry plans to ship even more oil from the Midwest to California, with rail deliveries accounting for as much as 25 percent of imports by 2016.

Why the gusher?

It's about supply and demand.

We don't need to tell you about California's thirst for gasoline and other petroleum products. But production in the state's oil fields is declining, falling by almost half since 1986. Production also is dropping in Alaska's North Slope oil fields.

Meanwhile, oil production is climbing rapidly in other states (Canada also is a growing supplier), but they lack California's refining capacity. The state has 20 major oil refineries with the ability to process about two million barrels a day — trailing only Texas and Louisiana.

Without pipelines connecting California to the emerging oil fields, tanker cars are in demand.

"There's not a terribly good infrastructure to get oil to the coasts where most of the refining and, frankly, most of the customers are," Tupper Hull of the Western States Petroleum Association told KQED recently.

In his budget, Gov. Jerry Brown proposed a 15 percent funding increase and 38 new positions in the state Office of Spill Prevention and Response.

But primary responsibility falls to Washington, which sets rail safety standards.

With oil-related rail accidents increasing from nine nationally in 2010 to 108 last year, the National Transportation Safety Board called for regulations requiring stronger tanker cars and safer routes. The Transportation Department has yet to act on the regulations.

California, the nation and the world must reduce their dependence on fossil fuels. But that isn't going to happen overnight, and reduced demand won't change the need for safety, which is just as important as conservation. It can't wait for an Exxon Valdez on rails.