Oil doesn’t find itself: Democrats call the tax writeoff for exploration like this a “subsidy.” Photo: National Geographic/Getty Images

President Obama and his allies are rushing to boost their own popularity by painting “Big Oil” as the biggest villain since Snidely Whiplash — profiteering fat cats who’ve tied the American people to the railroad tracks and need to be punished with new taxes.

This fractured fairy tale is based on a fundamental misunderstanding of how the energy market functions. Yes, higher oil prices earlier this year led to rising industry profits as consumers were taking a hit at the pump. But oil companies don’t control the price of oil and never have.

That misunderstanding — or, in the case of politicians, feigned ignorance — led to the crippling of the energy industry in the 1970s. Now we see the Obama administration, high on populism and zealous to push alternative energy, itching to repeat those mistakes. Yet handcuffing the oil and gas industry will only push energy prices even higher.

The price of crude oil is set by impersonal factors. Global demand is rising thanks to an improving (if fragile) global economy — while global supply hasn’t been keeping up, thanks to artificial restrictions imposed by Western politicians. Supply has also been distrupted or threatened by uprisings in Yemen, Libya and Bahrain. And the dollar — the currency in which oil is priced — has been weak. Together, these factors recently pushed the price of a barrel of crude up to highs of more than 37 percent above a year ago.

As a result, consumers are paying upward of $3.50 for a gallon of gas, and oil company revenues have surged. But oil companies aren’t setting the price of oil. And now that pump prices are falling in response to the possibility of a new global slowdown, profits will be lower — because the companies’ fixed costs won’t change.

Honest analysts know these facts. But politicians ignore them in favor of sowing suspicion of the industry. The latest “solution” they offer is to reduce supposed tax-code “subsidies” to Big Oil.

In fact, the energy industry is hardly undertaxed: It pays an effective tax rate of 41.1 percent, compared with 26.5 percent for the rest of the S&P Industrials.

More important, this is no subsidy. When a business — any business — incurs expenses, it deducts those expenses against its revenues at tax time. In the case of the oil and gas industries, those expenses are overwhelmingly the costs of exploration and production. Some “subsidy.”

So the real-world effect of a politically motivated tax penalty on energy companies will be reduced exploration and extraction. Of course, that would be just fine for the green ideologues. For them, the less drilling the better, and the more subsidies for green energy, the better.

Meanwhile, the president’s drilling moratoria will stunt US offshore-oil production by 13 percent this year.

These are the same sorts of restrictions the Carter administration imposed on energy — partly in the name of frugality, and partly out of a similar baseless faith in alternative energies.

A recent report by the federal Energy Information Administration notes that the oil and natural gas industry will provide most of the nation’s energy until at least 2035. Even with skyrocketing subsidies for solar, wind and other green-energy sources, “alternatives” can meet only a tiny fraction of demand.

By choking oil and gas, President Obama is putting the economy in a headlock. What the oil and gas industry needs is a non-punitive tax code and permission to explore and develop new resources. Yet political posturing puts both at risk.

It’s easy to score political points off an unpopular industry. But the only results will be higher energy prices, an even weaker economy and stifled innovation.

Donald J. Boudreaux is a professor of economics at George Mason University. He blogs at CafeHayek.com.