It was close to 2 a.m. when Rep. Edward J. Markey (D-Mass.) and others on a House-Senate conference committee saw just how much clout the oil industry had when it came to winning special tax breaks and other financial benefits from Congress.

At issue was the 2005 Energy Policy Act — the largest energy bill in years. The committee chairman, Rep. Joe L. Barton (R- Texas), a friend of the industry, had saved some big issues for the end: billions of dollars in tax and royalty relief to encourage drilling for oil and gas in the Gulf of Mexico and other offshore areas. There was even a $50-million annual earmark to support technical research for the industry.

At the time, drilling was already proceeding at a brisk pace, and industry profits were setting records. “With all the money they are making,” Markey said to his top energy aide, who recalled the scene, “why does the government need to subsidize their work and their research?”

That point of view did not prevail. The bleary-eyed lawmakers wanted no part of Markey’s amendments. The bill was eventually passed in both houses with bipartisan support. Notably, then- Sen. Barack Obama of Illinois voted in favor.

Today, Markey and other critics complain that these policies have cost the U.S. Treasury tens of billions in lost revenue, and led to a reckless search for oil in fragile environments like the deep floor of the Gulf of Mexico. He and others say the unfolding catastrophe at the Deepwater Horizon rig, which exploded April 20 in a disaster that killed 11, can be directly linked to oil-friendly legislation over the last two decades.

On Monday, three senators introduced a bill to reduce tax breaks and royalty waivers they deemed a giveaway to big oil companies.

Industry officials contend that the incentives have resulted in gains in domestic production, additional fees paid to the Treasury, and many jobs created in gulf state oil communities. And they say there is no connection between the industry incentives and the explosion on the Deepwater Horizon rig.

But there is little disagreement that the industry received significant federal support for such deep-water drilling. Since the government began aggressively issuing offshore drilling permits under President Reagan, the industry has received tens of billions of dollars in tax breaks and subsidies, including exemptions from royalty payments — the fees due when a company extracts resources from U.S. government property.

The royalty waiver program was established by Congress in 1995, when oil was selling for about $18 a barrel and drilling in deep water was seen as unprofitable without a subsidy. Today, oil sells for about $70 a barrel, but the subsidy continues.

The Government Accountability Office estimates that the deep-water waiver program could cost the Treasury $55 billion or more in lost revenue over the life of the leases, depending on the price of oil and gas and the performances of the wells.

Congress had originally intended to provide royalty relief only when oil prices were especially low. But an Interior Department error in the drafting of contracts in the 1990s led the industry to argue against pegging the relief to oil prices.

Oil companies won a lawsuit last year requiring the government to pay back $2.1 billion in royalties from previous years, including about $240 million to BP.

An increasing number of analysts say the waiver program has pushed drilling into fragile and remote areas where emergency response plans were inadequate.

“If it wasn’t profitable for them to do it, then that’s a good argument for leaving the oil in the ground,” said Robert Gramling, who studies the history of the oil industry at the University of Louisiana, Lafayette. The government-subsidized rush to deep-water exploration led to a situation where the industry was doing “things that were technically possible but were beyond our ability to undo them if we find out we have a problem.”

At the industry-funded American Petroleum Institute, policy advisor Allison Nyholm disputes Gramling’s conclusions and points out that the incentives yielded an enormous jump in energy resources. In addition, she said, the expansion of drilling in the gulf created tens of thousands of jobs.

But through the years, critics have argued that the incentives are no longer necessary.

“No reputable economist believes that increasing the amount of [offshore] drilling we do will have any real impact on energy prices,” said Rep. Nick J. Rahall II (D-W.Va.), chairman of the House Natural Resources Committee, in a hearing last year as he called for the end of some of the royalty waiver programs and for a more cautious approach to drilling.

In addition, several analysts say, billions more have been lost to the Treasury through another form of subsidy — favorable packaging of federal leases sold by the Interior Department.

Bill Freudenburg, a professor of environmental studies at UC Santa Barbara who has worked with Gramling studying the economics of offshore drilling, contended that such packaging had in effect given away drilling rights. He noted that in the early 1980s, the Interior Department began selling drilling leases at an average rate of $263 per acre compared with $2,224 per acre in the previous decades.

A 2008 General Accounting Office report found that out of 104 jurisdictions throughout the world, only 11 received a smaller portion of oil revenue than the U.S. government.

“We were just stunned by how badly the American taxpayer has been getting screwed,” Freudenburg said.

“I don’t know of too many places where it is harder and more expensive to get oil out of the ground than the North Sea off of Norway. And Norway somehow manages to get a 75% take [of oil revenue], basically double of what we get.”

Mark Salt, a BP spokesman, said, “We are active in a whole range of countries and a whole range of licensing regimes, including Norway. Royalty relief is a widely used system and it’s a matter for governments to determine their efficacy.”

At the American Petroleum Institute, Nyholm said it was a mistake to look only at the lease price or the royalty rate.

“The government’s take includes royalty rates, lease sale bids, bonus bids that are paid at the time of the lease. It includes rents and taxes. … Different countries structure their programs differently. We have a very, I would say, complicated structure.” But, she adds, it has yielded strong results, such as new exploration and job creation.

The industry also argues that comparing the price per acre on drilling leases unfairly pits an era of easy discovery against one in which production is far more problematic.

The bill introduced in the Senate on Monday would charge an excise tax — worth $5.3 billion over 10 years — on oil produced under certain leases. It would also close other tax breaks to industry, including some items that President Obama had suggested ending.

A different approach in the House, which would require companies that seek new leases to renegotiate existing royalty waivers or pay a fee, has cleared that body on multiple occasions but never won approval in the Senate.

Industry lobbyists have rallied effectively during previous efforts to rein in the oil exploration and subsidy programs. All told, the oil and gas industry spent $174.7 million and registered 788 lobbyists to influence lawmakers and regulators last year, according to the Center for Responsive Politics, a nonpartisan research organization. Since 1998, the industry has spent $966.8 million on lobbying, making it the sixth-biggest-spending interest group in Washington, the center found.

“Previous attempts to close these loopholes were dead on arrival because of the industry’s clout,” said Sen. Bill Nelson (D-Fla.), who co-sponsored the bill with Sens. Robert Menendez (D-N.J.) and Jeff Merkley (D-Ore.). “Maybe that won’t be the case this time.”

kim.geiger@latimes.com

tom.hamburger@latimes.com