In the biggest move yet aimed at blocking the Trump administration’s plans to allow new offshore oil drilling off the California coast, state lawmakers have approved a bill that would ban construction of new pipelines to get the oil to shore.

By a vote of 45-25 late Monday, the state Assembly passed SB 834, a measure that prohibits the State Lands Commission from allowing any new wharfs, piers, pipelines and other facilities in state waters from the shoreline out to three miles offshore that could be used to expand oil production.

“The Trump Administration’s proposal to dramatically expand offshore oil drilling is dangerous, reckless, and a direct threat to our coastal community,” said State Sen. Hannah-Beth Jackson, D-Santa Barbara, the bill’s sponsor. “California must stand firm in our opposition to this expansion, which could devastate our marine ecology, public health and coastal economy.”

A poll in January by the non-partisan Public Policy Institute of California found 69 percent of Californians oppose new offshore oil drilling, while 25 percent support it.

The bill is one of the top priorities for environmentalists in Sacramento this year. It was blocked last year by oil industry opposition.

But this year, with a deadline of Friday fast approaching for all bills to pass or die, the measure has new momentum, largely because the Trump administration announced in January that it would seek to open 90 percent of the offshore areas in the United States, including most of the California coast, to new oil and gas drilling.

The bill goes next to the state Senate for a vote as soon as Wednesday. If it is approved there, as expected, it will head to the desk of Gov. Jerry Brown, who has opposed the construction of new oil platforms in the ocean off California’s coast.

The oil industry continued to battle the measure Tuesday.

“Bans are not the answer,” said Catherine Reheis-Boyd, president of the Western States Petroleum Association, a leading industry trade group.

She said the bill would have “an immediate negative impact on our state’s energy supply and the Californians who work to provide it.”

And the oil that Californians consume when they drive their cars has to come from somewhere, the industry notes.

“Demand for fuel is not decreasing,” Reheis-Boyd said. “Every barrel of oil not produced in California will be replaced by a barrel produced and shipped in from a region that doesn’t have our state’s stringent environmental laws.”

A similar bill, AB 1775, by Assemblyman Al Muratsuchi, D-Torrance, passed the state Senate 26-9 on Tuesday and heads now to the Assembly for a final vote.

California is the nation’s third-largest oil-producing state, behind Texas and North Dakota. Most of its oil is produced from inland wells, but there are 32 offshore platforms and artificial islands where oil is produced, all located in Southern California off the coasts of Santa Barbara, Ventura, Los Angeles and Orange counties.

They date back to the 1950s, and no new ones have been constructed in more than 30 years because of opposition from political leaders, conservation groups and the tourism and fishing industries.

State leaders and many residents still remember the 1969 Santa Barbara oil spill, which resulted in more than 3 million gallons of black crude from a Union Oil platform coating beaches for miles.

The idea behind the bill that passed the Assembly on Monday came from a tactic used in Santa Cruz more than 30 years ago.

In 1985, after President Ronald Reagan and his interior secretary, James Watt, proposed new drilling in federal waters off Big Sur, the San Mateo County coastline and other sensitive areas, Santa Cruz city voters by an 82-18 percent margin passed a local ordinance to ban construction of all new pipelines, oil tanks, helicopter landing pads and other infrastructure that the oil industry would need to process the oil onshore.

Dan Haifley, a local environmental activist, drove up and down the coast, urging other communities to pass similar laws. Many did, and the local laws survived legal challenges from the Western States Petroleum Association.

At least 18 California coastal cities and nine of California’s 15 coastal counties — Santa Cruz, San Mateo, Monterey, San Luis Obispo, San Francisco, Sonoma, San Diego, Humboldt and Mendocino — have local laws that ban the construction of onshore oil terminals, pipelines and other oil equipment.

The bill moving toward passage this week in Sacramento would do a similar thing, affecting state ocean waters, rather than city and county land, and covering every mile of the state’s shoreline.

“If Trump goes ahead as we think he will shortly after the midterm elections, and offers to lease tracts off the places the oil industry wants to drill — La Jolla, Mendocino, Malibu, you name it — this would dissuade the oil industry from submitting bids because they would have no way to bring it to shore,” said veteran coastal activist Richard Charter, of Bodega Bay, a senior fellow with the Ocean Foundation in Washington, D.C. “It would set the stage for an epic lawsuit. States have the right to say no.”

Other states are taking a similar approach. In April, New Jersey Gov. Phil Murphy signed a law banning the construction of new oil facilities in state waters out to three miles offshore, saying oil spills would threaten the state’s $38 billion coastal tourism industry. Similar measures are under consideration in Delaware and Maryland, and a measure on Florida’s November ballot would enact a similar ban.

In 1992, former California Gov. Pete Wilson, a Republican, signed a law banning all new oil drilling in state waters out to three miles offshore. Drilling is also banned in national marine sanctuaries, such as Monterey Bay, Greater Farallones and Channel Islands. But large areas in federal waters from three to 200 miles offshore that are not included in marine sanctuaries could be opened under the Trump administration’s efforts, which call for ocean areas off Northern California, Oregon and Washington to be leased to oil companies for new drilling starting in 2021 and off Southern California in 2020.