LOS ANGELES (MarketWatch) -- BP PLC will reduce its contribution to U.S. coffers by roughly $10 billion due to a tax credit the company is claiming it incurred from the Gulf of Mexico oil spill.

The oil giant BP, -1.18% said Tuesday that it is incurring a charge of $32.2 billion from the Deepwater Horizon disaster response, and as such, it is claiming a $9.9 billion taxation credit.

Asked in a conference call Tuesday about whether it has discussed the tax credit with President Barack Obama's administration, BP's outgoing chief executive, Tony Hayward said: "We have followed the IRS regulations as they're currently written."

The Internal Revenue Service said it's not allowed under federal law to discuss individual taxpayer issues.

But the issue has raised red flags among federal officials, particularly in light of recent efforts by various other entities that have settled with the United States.

White House Press Secretary Robert Gibbs said the following in a briefing with reporters: "I don't think anybody would prefer that [BP] do that." Gibbs, however, did not say whether Obama would discuss the issue with BP.

One notable example of a company that decided to forgo a deduction is Goldman Sachs Group Inc. GS, +2.12% , which agreed last month not to write off $535 million in penalties as part of its settlement with the Securities and Exchange Commission. The SEC had sued Goldman Sachs, alleging that it hid critical information from investors in its mortgage securities.

SEC officials had come under fire from Congress for previously allowing tax deductions from penalties in other cases.

Analyst Fadel Gheit of Oppenheimer & Co. called the tax credit the result of "straightforward costs related to operation."

But at least one Democratic lawmaker, U.S. Rep. James Oberstar of Minnesota, chairman of the committee on transportation and infrastructure, is appalled. "BP's decision to claim a nearly $10 billion tax credit stemming from costs it incurred during the oil spill cleanup is nothing short of reprehensible," he said in a statement.

"At a time when the Gulf Coast is reeling from this catastrophic economic and environmental disaster, the last thing the region needs is for BP to substantially offset the amount it is paying to meet its responsibilities for cleanup and compensating victims," Oberstar added.

Another wrinkle in this situation, though, is that it appears no other entity in hot water with the U.S. government has incurred costs on a similar scale as BP. The company has agreed to put $20 billion in an escrow account to pay claims for oil-spill damages.

A goof?

But half of that may now come out of government coffers, and it could prove to be embarrassing for the Obama administration, presuming the president and Hayward did not discuss the issue at their recent meeting, according to David Desser, managing director of Juris Capital, which invests in corporate litigation. It was after that meeting that Hayward announced the $20 billion escrow fund.

"You would have thought in advance of that meeting, they would have thought of all of those issues," Desser said. "How do you unring that bell?"

"It looks to me like maybe the administration goofed here," he added.

Robert Yetman, associate professor for the University of California at Davis Graduate School of Management, said the critical question is whether the discussion between Obama and Hayward constitutes a "settlement."

In the Goldman Sachs case, the company was sued by the SEC, but no formal legal action has yet been taken by the federal government against BP. Goldman Sachs agreed to forgo any deduction for which it was eligible, but had the case run its course, any fine or penalty incurred would not be deductible.

Another key difference is that Goldman Sachs didn't really need the tax break, while BP's bottom line is under severe pressure. The company plans to shed a number of assets and reported a $17.2 billion second-quarter loss on Tuesday. Read more about BP's plans.

"BP is a little bit under the gun here," Yetman said. "I don't know how they're going to play it, and I don't know how the public is going to respond. But there are certainly differences."

After the Deepwater Horizon rig exploded on April 20, the damaged well a mile below the ocean's surface spewed oil into Gulf waters for three months before the company was able to cap it. BP is in the process of drilling a relief well to permanently plug the well.

While the spill has taken a toll on local economies throughout the Gulf Coast, it also has cost the company. Hayward will be nominated as a nonexecutive director at BP's Russian joint venture, and Robert Dudley will take over the beleaguered business.

BP shares were off 1.7% to $38 in trading on Tuesday.