How much does the president have to do with the price of gasoline?

A lot, say American voters. According to oil experts and economists, not so much — at least in the short term.

Today’s oil prices are the product of years and decades of exploration, automobile design and ingrained consumer habits combined with political events in places such as Sudan and Libya, anxiety about possible conflict with Iran, and the energy aftershocks of last year’s earthquake in Japan.

“This notion that a politician can wave a magic wand and impact the 90-million-barrel-a-day global oil market is preposterous,” said Paul Bledsoe, strategic adviser to the Bipartisan Policy Center and a former Clinton administration official.

The price of gasoline is a hardy perennial in presidential campaigns. Jimmy Carter struggled with high gas prices, which had doubled since the Iranian revolution. And during the 2008 presidential race, Barack Obama said in a campaign speech that “here in Ohio, you’re paying nearly $3.70 a gallon for gas — 21 / 2 times what it cost when President Bush took office.”

On Monday, President Obama defended his energy policy in a flurry of interviews with swing-state TV stations while GOP hopefuls Newt Gingrich and Rick Santorum stumped at an energy summit in Biloxi, Miss. “If we want to create lower prices for energy, we know how to do it — now,” Santorum said. White House spokesman Jay Carney fired back, blaming factors “well beyond the control of any administration.”

What can the president control? This year, Republicans are saying Obama has not done enough to promote domestic drilling, but the U.S. drilling-rig count is twice as high now as it was in 2009. With the exception of a spike in 2008, the current rig count is higher than any year since the early 1980s, according to figures compiled by WTRG Economics.

The White House frequently points to the increase in domestic oil production when talking about what it calls its “all of the above” policy to develop myriad sources of energy. But that is a result of new drilling techniques, the lure of high crude prices, and offshore projects that began before Obama entered the White House. Shell, for example, began oil production in the Gulf of Mexico from its Perdido platform during Obama’s term; it bought initial leases in the area in 1996 and began commercial development in 2006.

“Everyone takes credit for what’s on their watch,” said Frank Verrastro, director of the energy program at the Center for Strategic and International Studies.

(Related: A rule of thumb for gas prices and the economy)

U.S. policy makes a difference, energy experts say, but with a long delay, whether it is a matter of drilling for more oil or increasing the fuel efficiency of the automobile fleet, which takes a decade or more to turn over.

“There is a substantial time lag between the adoption of energy policies [on the demand and supply sides] and their impact on the market,” said Jay Hakes, a former administrator of the Energy Information Administration and now director of the Jimmy Carter Library and Museum. “George W. Bush deserves some credit for signing the 2007 legislation that has helped the current situation from getting worse, but [he] will never get any credit.”

Hakes said that “Obama is on a good path to ease future markets.” He cites the president’s decisions to open new areas for exploration and development, most notably Alaska’s Arctic coasts, and to deal aggressively with oil demand by raising efficiency standards for automobiles.

That hasn’t stopped Republican leaders — and voters — from blaming Obama for pump prices that have climbed to $3.80 for a gallon of regular gasoline, according to AAA. The 29.5-cent-per-gallon increase in the past month would, if sustained, wipe out a quarter of the effect of the payroll tax cut, siphoning off money that consumers might have spent elsewhere. Even if voters didn’t blame Obama directly for the increase, a slower economy might still hurt his reelection prospects.

Perhaps no politician has done more to put the onus on the president than Gingrich, who says he has a plan to reduce gas prices to $2.50 a gallon and offset the loss of output that might result from an attack on Iran, which exports about 2.5 million barrels of crude oil per day.

“There’s no way we could increase production that much,” said Verrastro of the CSIS. “But the facts be damned. It’s election season.”

As for lowering U.S. pump prices, that would require lowering world crude oil prices. Crude oil accounts for about three-quarters of the cost of a gallon of gas at these price levels, according to the Energy Information Administration. By comparison, taxes account for just 12 percent, refining about 6 percent, and distribution and marketing about 6 percent.

The international oil market has tightened, not because of a single factor such as U.S. drilling but because a series of crises has shaved oil production or boosted demand worldwide. Together they add up to a difference of about 1 million barrels a day in the global oil balance.

In the wake of a tsunami and earthquake last year, Japan has closed down virtually all of its 54 nuclear power plants and has been burning more oil to generate electricity; its power sector is using 320,000 barrels a day more than before the disasters, according to the International Energy Agency.

In Sudan, bickering between the north and the south and a dispute over pipeline revenue have choked off about 240,000 barrels a day, the IEA said. Unrest in Yemen and Syria knocked out about 100,000 barrels a day each. Libya’s output is recovering from last year’s civil war, but at 1.3 million barrels a day, output is still about 300,000 barrels a day short of capacity, traders say. And as a result of maintenance problems in the North Sea, Norwegian and British output is running about 160,000 barrels a day lower than normal, the IEA added.

In China, economic growth has slowed, but the IEA still expects demand to climb by 400,000 barrels a day.

This year, global oil demand will hit 89.9 million barrels a day, the IEA says, shrinking the spare production capacity to a level lower than Iran’s exports. That has spooked oil traders and refiners. Because oil products are so essential to companies and motorists, incremental changes in the supply-and-demand balance have a relatively large effect on prices.

Are speculators the problem? Traders magnify the size and speed of price movements, even if they don’t alter the direction. Large speculators are holding record-long positions in gasoline — which pay off when prices rise — and near-record-long positions in crude oil, notes Ed Yardeni, president and chief investment strategist at Yardeni Research. By buying these stakes in the market, they drive up prices now.

U.S. refinery maintenance is often blamed for gasoline price jumps, but crude oil prices have been high in Europe and Asia as well as in certain regions of the United States.

One thing a president can do is to release oil from the Strategic Petroleum Reserve that is kept in giant salt caverns near the Gulf of Mexico. That has happened three times — at the outset of Operation Desert Storm in 1991, after Hurricane Katrina swept through oil production and refining facilities in the Gulf states in 2005, and during the Libyan civil war in 2011. In 2000, President Bill Clinton ordered a swap of oil from the reserve, letting refiners give the oil back in 2001.

But oil experts are divided about the impact of such a release. In the past, SPR releases have lowered prices, but only temporarily. Moreover, the 696-million-barrel reserve — which could, for example, offset a 280-day suspension of Iranian oil exports — is an emergency stockpile for supply disruptions, not a device for blunting price increases.

Other issues have been raised that have little or nothing to do with current gas prices. Approving the Keystone XL pipeline, rejected by Obama with its current route and highlighted by Gingrich on Monday as a useful move, would not add to current oil supplies; it would only add to the excess pipeline capacity from Canada that is expected to last until 2016. Renewable energy such as wind and solar makes the electricity grid cleaner but has nothing to do with oil prices. Electric cars could help, but it is likely that their sales figures will fall short of administration goals. And higher U.S. production will cut U.S. oil imports and ease the pressure on global demand, but the United States will remain a major oil importer for many years.

Said Verrastro: “We need a reasoned debate based on facts, but that’s not the climate we’re in, unfortunately.”

Staff researcher Lucy Shackelford contributed to this report.