ShellNo flotilla participants float near the Polar Pioneer oil drilling rig during demonstrations against Royal Dutch Shell on May 16, 2015 in Seattle, Washington.

The House of Representatives on Wednesday passed two bills banning new offshore oil and gas drilling off the Atlantic and Pacific coasts and the Gulf Coast of Florida. It was set to vote on a third bill banning drilling in Alaska's Arctic National Wildlife Refuge.

The legislation could hamper President Donald Trump's push to expand offshore oil and gas development.

The first bill, Protecting and Securing Florida's Coastline Act of 2019, would ban oil and gas leasing in eastern areas of the Gulf of Mexico off the Florida coast.

The measure passed 248-180, with the support of about 20 Republicans. Rep. Francis Rooney, R-Fla., the bill's sponsor, said a series of spills from oil and gas operations in the Gulf have threatened jobs in marine recreation and fishing.

The House also passed a measure, 238-189, sponsored by Rep. Joe Cunningham, D-S.C., to permanently ban oil and gas leasing off the Pacific and Atlantic coasts.

"This bill acknowledges that if we don't act, drilling rigs could soon appear off of our beaches," said Cunningham, whose state's beaches are a major tourist draw.

The bills were not expected to gain traction in the Republican-led Senate. But the votes in the Democratic-led House were meant to send a signal to Republicans who have supported rollbacks of environmental regulations on oil and gas.

Oil and gas interests opposed the bills, saying bans only increase U.S. dependence on foreign oil.

"Congress should reject these bills, which would only outsource energy production to countries like Saudi Arabia and Russia, and instead stand up American energy produced with American values," said Tim Charters, a vice president at the National Ocean Industries Association.

In 2017, Trump signed an executive order to start a five-year development plan for offshore drilling in the Gulf of Mexico and off the East Coast. It was an effort to reverse former President Barack Obama's drilling ban on roughly 120 million acres of Arctic Ocean and 3.8 million acres in the Atlantic.

A federal judge later ruled that Trump's order to revoke the drilling ban was unlawful because it exceeded the president's authority.