Lawmakers approved the Atlantic and Pacific measure 238-189, while the bill to block drilling in the Gulf of Mexico near Florida was approved 248-180. The bills head to the Republican-controlled Senate, where action is unlikely.

The votes come as the Trump administration is reevaluating a plan to sharply expand offshore drilling amid a series of court challenges.

Republican and Democratic governors and lawmakers from coastal states strongly oppose expanded drilling. A federal judge in March ruled against President Donald Trump’s executive order to open the Arctic Ocean and parts of the Atlantic to broader oil and gas development, saying Trump had exceeded his authority.

Interior Secretary David Bernhardt has called the legal challenges “discombobulating” to the administration’s plans and said officials are likely to wait for the court cases to be resolved before proceeding with offshore drilling.

Even so, lawmakers who oppose drilling said a legislative fix is needed.

“If we don’t act, drilling rigs could soon appear off our beaches,” said Rep. Joe Cunningham, D-S.C., the lead sponsor of the bicoastal drilling ban. Cunningham won his seat last year in part because of his opposition to drilling off South Carolina’s beach-dominated coast.

“The Low Country (near Charleston, S.C.) is a force to be reckoned with, and we stand firm in our opposition to drilling off our shoreline,” Cunningham said. Offshore drilling could ruin the state’s tourism-based economy, “ruin our vibrant natural resources” and harm the state’s “unique way of life,” he said.

“Drilling off the coast of Florida would create an industrial coastline less appealing to visitors, hinder our military readiness and adversely affect our environment,” said Rep. Francis Rooney, R-Fla., co-sponsor of the Florida bill, which extends a moratorium set to expire in 2022.

Bishop and other Republicans touted an alternative bill that would boost drilling on federal lands and offshore.

The GOP bill “is for all energy, all of the above, both fossil fuel and alternative, one that actually will grow our economy, create more jobs and give a logical standard of what we should do,” Bishop said.

Offshore drilling would harm New Jersey’s booming tourism and fishing industries, Pascrell said, adding that it also could have a devastating impact on climate change. “As yet another report today makes clear, the earth is getting hotter. We need solutions, not more drilling,” he said.

Tim Charters, vice president of the National Ocean Industries Association, said the twin House votes Wednesday “should be recognized as what they are: the opening salvo of the so-called Green New Deal.” Bills to block drilling “are not about limiting emissions or protecting the environment,” he said. “They are about normalizing a shortsighted vision of an America where affordable and reliable energy resources are locked away indefinitely.”

But Alex Taurel of the League of Conservation Voters said the votes were “further proof that protecting coastal economies from President Trump’s plans to radically expand offshore drilling is not a partisan issue — it’s common sense.”

The question now, Taurel added, is whether Senate Majority Leader Mitch McConnell will allow votes on the bills “or will he continue to operate the Senate as a legislative graveyard and leave states like Florida, Georgia, North Carolina and Maine at risk of offshore drilling?”