WASHINGTON — The House, responding to growing public demand for more domestic energy, voted Wednesday to end a quarter-century ban on oil and natural gas drilling off the Pacific and Atlantic coasts — and a more recent ban on developing oil shale in Utah, Wyoming and Colorado.

Extension of the bans for another year was left off a $630 billion-plus stopgap government spending bill that President Bush had threatened a veto — possibly shutting down the government — if the bill had included Democratic proposals that Republicans said allowed too little drilling and development.

It gave Republicans a key win on energy policy. But it was also a victory for moderate Rep. Jim Matheson, D-Utah.

He had persuaded House Democratic leaders earlier to support dropping the ban on developing oil shale ban to instead allow it in states that approve it, which Utah likely would. Democrats proposed to include Matheson's language in the stopgap spending bill, and put it in an earlier Democratic energy bill.

While Matheson's language was not in the final spending bill, he said, "The bottom line is that the moratorium on oil-shale development lapses in a week because I succeeded in building strong bipartisan support for opening up the option."

He added, "We need to find more oil in our country, and Utah's resources are a key part of the effort."

Sen. Bob Bennett, R-Utah, also said, "Today's news is a victory for common sense and a breakthrough in energy development for Utah and our nation."

He added, "Americans have spoken loud and clear that we need to find more American energy today so we don't face a similar energy crisis in the future. This decision puts us closer to answering their calls."

Utah, Colorado and Wyoming may have up to 1.8 trillion barrels of oil trapped in oil shale by some estimates. Environmental groups strongly opposed lifting a moratorium on issuing final rules to allow leases for development, saying it will threaten wild areas, use huge amounts of scarce water and hurt global warming.

The bill was approved 370-58 and now goes to the Senate, where it is likely to be approved within the next few days, also without the bans.

The decision to avoid a fight with the White House over offshore drilling marks a major shift by Democrats on energy policy and a reflection that the GOP argument for more domestic energy production had found a support among voters this election year, even though coastal states long have worried that offshore drilling might cause spills, soil beaches and threaten their tourist businesses.

Republican presidential nominee John McCain has made expanded offshore drilling a central part of his campaign, arguing that access to an estimated 18 billion barrels of oil in the off-limits Outer Continental Shelf is essential if the country is to become more energy independent.

McCain's Democratic presidential rival, Barack Obama, also has endorsed limited expansion of offshore drilling, but only as part of a broader energy package that boosts use of alternative energy sources and increases efficiency.

Lifting the offshore ban does not itself mean drilling in the offshore waters is imminent. But it could set the stage for the Interior Department to offer leases in some Atlantic federal waters as early as 2011 under its current five-year offshore drilling plan.

Democratic leaders made clear the battle over offshore drilling is far from over. Even before the House vote, Rep. Ed Markey, D-Mass., introduced legislation to protect Georges Bank off New England — an area believed to have significant oil resources — from drilling.

In the Senate, Jim Manley, a spokesman for Senate Majority Leader Harry Reid, D-Nev., said, "We look forward to working with the next president to hammer out a final resolution of this issue."

Democrats could reinstate the ban next year as part of a new spending measure.

E-mail: [email protected]