Some of the tax breaks date back nearly a century, when they were intended to encourage exploration in an era of rudimentary technology, when costly investments frequently produced only dry holes. Because of one lingering provision from the Tariff Act of 1913, many small and midsize oil companies based in the United States can claim deductions for the lost value of tapped oil fields far beyond the amount the companies actually paid for the oil rights.

Other tax breaks were born of international politics. In an attempt to deter Soviet influence in the Middle East in the 1950s, the State Department backed a Saudi Arabian accounting maneuver that reclassified the royalties charged by foreign governments to American oil drillers. Saudi Arabia and others began to treat some of the royalties as taxes, which entitled the companies to subtract those payments from their American tax bills. Despite repeated attempts to forbid this accounting practice, companies continue to deduct the payments. The Treasury Department estimates that it will cost $8.2 billion over the next decade.

Over the last 10 years, oil companies have also been aggressive in using foreign tax havens. Many rigs, like Deepwater Horizon, are registered in Panama or in the Marshall Islands, where they are subject to lower taxes and less stringent safety and staff regulations. American producers have also aggressively exploited the tax code by opening small offices in low-tax countries. A recent study by Martin A. Sullivan, an economist for the trade publication Tax Analysts, found that the five oil drilling companies that had undergone these “corporate inversions” had saved themselves a total of $4 billion in taxes since 1999.

Transocean  which has approximately 18,000 employees worldwide, including 1,300 in Houston and about a dozen in Zug, Switzerland  has saved $1.8 billion in taxes since moving overseas in 1999, the study found.

Transocean said it had paid more than $300 million in taxes so far for 2009, and that its move reflected its global scope, with only 15 of its 139 rigs located in the United States. “Transocean is truly a global company,” it said in a statement.

Despite the public anger at the gulf spill, it is far from certain that Congress will eliminate the tax breaks. As recently as 2005, when windfall profits for energy companies prompted even President George W. Bush  a former Texas oilman himself  to publicly call for an end to incentives, the energy bill he and Congress enacted still included $2.6 billion in oil subsidies. In 2007, after Democrats took control of Congress, a move to end the tax breaks failed.

Mr. Menendez said he believed the Gulf spill was devastating enough to spur Congress into action. But one notable omission in his bill shows the vast economic reach of the industry. While the legislation would cut many incentives over the next decade, it would not touch the tax breaks for oil refineries, many of which have operations and employees in his home state, New Jersey.

Mr. Menendez’s aides said the senator thought it was legitimate to allow refineries to continue claiming a manufacturing tax credit that he wants to eliminate for drillers because refining is a manufacturing business and because refineries do not benefit from high oil prices. Mr. Menendez did not consult with New Jersey refineries when writing the bill, his aides said.