For 25 years, environmentalists have staved off drilling in an oil-rich, 1.5-million-acre stretch of the Arctic National Wildlife Refuge, a wilderness that shelters birthing caribou as well as musk oxen and millions of migratory birds. But record-high gasoline prices and last year's electoral gains by Republicans may have shifted the political dynamic, and Congress now stands on the verge of opening the region to energy development.

On Thursday the Senate voted 51 to 48 to allow drilling in the refuge as part of a massive budget package; this week the House is expected to take up its version, probably with identical wording. The House vote remains too close to call, but proponents say they are within reach of victory.

"I'm optimistic," said Bob Moran, a Washington representative for the American Petroleum Institute who says at least 5 billion barrels of oil lie beneath the refuge. "We're on the 10-yard line, and it's been a 25-year-plus game. The crowd is with us, and we're going to make it."

But opponents, including a coalition of moderate Republicans, liberal Democrats and environmentalists, say they may still prevail because, they argue, the measure will do little to ease the current energy crunch. House GOP leaders are scrambling to gather votes for their bill, which has angered some rank-and-file Republicans because of its offshore and Alaska drilling provisions, as well as cuts to food stamps and student loans.

"Hope springs eternal that we can pull the rabbit out of the hat," said Science Committee Chairman Sherwood L. Boehlert (R-N.Y.), a vocal critic of drilling in the Arctic reserve. "I really do think moderates are coming into their own. We're flexing our muscles collectively."

The Alaskan refuge entered political limbo a quarter-century ago -- just after President Jimmy Carter lost his reelection bid -- when Congress passed legislation saying only it could ban or approve drilling there. The GOP-controlled Congress approved drilling in a 1995 budget bill, but President Bill Clinton vetoed the measure. Ever since he took office, President Bush has been pushing to explore for oil in the refuge.

Until this year the two sides had been at a standoff and ANWR, with its unwieldy acronym, had become shorthand for either pristine wilderness or untapped energy wealth.

"It's become almost a symbol for both sides," said Cindy Shogan, executive director of the Alaska Wilderness League, which opposes drilling. "The question is whether the American people and their culture are going to protect the places that are special or develop everything."

The oil industry picked up a net three Senate votes after the 2004 elections, when Republicans Jim DeMint (S.C.), Richard Burr (N.C.), Mel R. Martinez (Fla.) and John Thune (S.D.) replaced drilling opponents. Environmentalists got just one new vote in Ken Salazar (D-Colo.). In March the Senate approved oil exploration by 51 to 49 in its nonbinding budget resolution; the reconciliation bill before Congress now is the one that legally authorizes drilling.

Two dozen moderate House Republicans have warned the leadership not to force a vote on the Arctic refuge as part of next week's budget bill, and House leaders are considering yanking the provision only to reinsert it during negotiations with the Senate.

"I feel very strongly about [opposing drilling], but I also feel strongly about the need to reduce the budget's deficit," said Rep. Jeb Bradley (R-N.H.), who wrote the warning letter to House leaders in August.

Massachusetts Rep. Edward J. Markey, who has led the Democrats' fight to preserve the refuge, warned Friday that Bradley and others may pay a price in the 2006 elections if they vote for oil exploration.

"Moderate Republicans may need a political refuge somewhere in Alaska if they are repeatedly asked to approve drilling in the Arctic National Wildlife Refuge, because that's where voters might send them a year from now," Markey said. "It will be a preserve of what a moderate Republican used to look like."

Even if Congress allows drilling in the Arctic, it would take from six to 10 years to begin production there. Tiernan Sittenfeld, legislative director of the League of Conservation Voters, said the move would save Americans just one penny per gallon of gasoline by 2025.

"Americans want real solutions to their energy problems, like increasing fuel-efficiency standards and, with winter approaching, helping people weatherize their homes," Sittenfeld said.

But Interior Secretary Gale A. Norton said that if Clinton had approved it a decade ago and ANWR's fields had reached peak production, the output could replace the Gulf of Mexico oil that is currently not being tapped because of damage from this summer's hurricanes. GOP leaders estimate the refuge would generate $2.5 billion in revenue through oil and gas leases, though opponents call those numbers inflated.

Roger Herrera, a former British Petroleum geologist who has lived in Alaska for 30 years and sits on the board of the lobbying group Arctic Power, said the recent rise in oil prices and gas shortages "have been beneficial" to his cause.

"We've always argued energy isn't something you should be complacent about," Herrera said.

David Karvelas, chief of staff to drilling opponent Rep. Nancy L. Johnson (R-Conn.), described the legislative showdown as "do or die."

"This is their best shot," he said of those who back exploration in the refuge. "If they can't get it done with rising gas prices, it's over."

Kaktovik, Alaska, population 284 according to a 2003 census estimate, is the only community within the Arctic National Wildlife Refuge. The Senate voted last week to allow drilling in the refuge, but prospects for passage in the House are too close to call.