As the nation remains engrossed - and disgusted - by plumes of oil gushing from BP's wellhead on the ocean floor in the Gulf of Mexico, the Alaskan Exxon Valdez spill of the 1980s comes to mind. Similar to that experience, we will see everyone from federal and local governments to private landowners and local businesses filing lawsuits against BP. But what the public may not know is that it may end up footing a good portion of BP's legal damages, fees and costs because they are tax deductible.

History tells the tale. After long battles with the federal government and the State of Alaska, Exxon eventually settled for a reported $1.15 billion (of which $125 million was forgiven in recognition of that company's cooperation). But the reality, according to the Congressional Research Service, is that the after-tax cost to Exxon was $524 million, and more than half of the $900 million in civil damages it paid were also tax deductible. In other words, taxpayers picked up much of the bill.

The same slippery tax secret is at issue with BP. Thanks to a commonly used provision in the Internal Revenue Code, the oil company may be able to deduct many of the settlements and judgments against it as "ordinary and necessary" business expenditures. These deductions result in fewer taxes paid and, for a corporation like BP, the after-tax savings are as high as 35 percent, excluding any state and local income tax savings. Worse, these deductions can be carried back two years and forward 20 years to more profitable times.

What constitutes an "ordinary and necessary" business expense was intentionally left undefined by Congress, because listing all these expenses (e.g., rent, salaries, utilities) would be too lengthy and cumbersome. The lack of a formal list has created some confusion about what deductions qualify, and generally speaking, the courts have been liberal in interpreting the rule. As a result, companies have deducted as business expenses everything from judgments for patent infringement to settlements relating to antitrust disputes. Legal and accounting fees are also often deductible if the lawsuit arises in the ordinary course of business. And even claims resulting from a violation of state or federal law are able to be deducted as long as they are sufficiently connected to a business' operations. So, as unbelievable as it is, negligence, fraud and a host of other misdeeds may be deductible, as are punitive damages assessed for wrongdoings.

Juries are typically oblivious to the tax ramifications of such awards. Consequently, punishment may be sharply different from what was intended. (The Obama administration has proposed eliminating the tax deductibility of punitive damages.)

The deductibility of payments made to settle claims and judgments filed by government agencies is different. The federal tax code specifically prohibits a deduction for any civil or criminal "fines or penalties" paid for the violation of any law. Compensatory damages on the other hand, even if paid to a government, are deductible. Thus, whether or not a payment is deductible depends on the specifics of the law violated.

Criminal fines are generally not deductible, but civil fines are murky. If the intent is paying for the damage caused or otherwise making a victim whole, then the deduction is allowed. If, on the other hand, a civil penalty is intended to penalize a certain behavior, then the payment is punitive and the deduction is not permitted.

In any case, we can anticipate a protracted fight by BP with regard to any violations of the nation's pollution control laws and non-environmental laws that may apply. In this fight, BP will certainly characterize any civil monetary sanctions as compensatory payments to the government for harm suffered, therefore qualifying them as tax-deductible expenses. Ultimately, each settlement or judgment will have to be analyzed separately to determine whether the associated payments are deductible in whole or in part, but BP is likely to win on many fronts here.

But one thing is for sure: Even when BP loses, we will all pay a portion of its greasy mess.