WASHINGTON (Reuters) - The U.S. House of Representatives passed legislation Tuesday that lifts a longstanding ban on offshore oil drilling, opening most of the U.S. coastline to exploration.

Workers are seen on an oil platform off the coast of New Orleans, in the Gulf of Mexico, June 3, 2008. REUTERS/Jessica Rinaldi

The package proposed by Democrats would give states the option to allow drilling between 50 and 100 miles (80 and 160 km) off their shores. Areas more than 100 miles from the coast would be completely open to oil exploration and drilling.

The House voted 236 to 189 in favor of the package.

Until recently, Democratic leaders in Congress strongly opposed lifting the moratorium on offshore drilling, saying drilling would have only a small impact on gasoline prices in the immediate future.

But as gasoline prices rose to levels above $4 a gallon this summer, public opinion shifted in favor of offshore drilling. Republicans made removing the ban on drilling a key campaign issue for their party in this election year.

With the moratorium facing expiration on September 30 and voter sentiment changing, Democrats supported repealing the ban as part of a larger energy package.

House Republicans, however, strongly protested the Democrats’ package, calling the bill a “sham” and a “hoax.”

The bill faces a possible veto from the White House.

“At a time when American families are in need of genuine relief from the effects of high fuel prices, this bill purports to open access to American energy sources while in reality taking actions to stifle development,” the White House said in a statement.

Opponents of the bill say since the bill does not include a revenue sharing plan, states will not have an incentive to open their coasts to exploration. Another complaint is that the requirement that drilling occur at least 50 miles away from the U.S. coast closes a great deal of the outer continental shelf where oil may be located.

Democrats countered that their package would open 319 million acres to 404 million acres off the Atlantic and Pacific coasts to drilling.

“This legislation is a result of reasonable compromise that will put us on a path to energy independence by expanding domestic supply,” said House Speaker Nancy Pelosi.

Conservation groups blasted the House bill, however, for not protecting the environment. “As it stands, the clean energy provisions in this bill are dwarfed by the push for outdated, dirty and expensive energy,” said Natural Resources Defense Council President Frances Beinecke.

Later this week, the Senate is expected to take up energy legislation that would expand offshore drilling, but not as much as the House. Both chambers would have to reconcile differences between their bills before a final energy package could be sent to the White House to be signed into law.

Time is running out for lawmakers to pass legislation as Congress is scheduled to adjourn on September 26.

Other provisions in the House energy package include:

-- Selling 70 million barrels of light crude oil from the Strategic Petroleum Reserve, to be replaced with heavy crude oil.

-- Offering renewable energy and efficiency tax credits that would be funded by repealing some tax breaks for the oil industry.

-- Allowing oil shale development in some western states, if the states approve.