GOP nominee Mitt Romney makes sure he gets to make his point even as debate moderator tries to move on.

When you pull up to that gas pump and nearly faint from how much it costs you to fill 'er up, you may be tempted blame the government for not doing enough to keep a lid on prices.

Resist the temptation. The truth is the global nature of the world's energy supply means that no president has much power over what you pay at the pump.

The question of whether the nation's chief executive can do anything to lower soaring energy costs has been a bone of contention between President Barack Obama and his GOP rival, former Mass. Gov. Mitt Romney.

That bone was tossed about in Tuesday's debate at Hofstra University in Long Island, N.Y.

“The proof of whether a strategy is working or not is what the price is that you're paying at the pump,” Romney said in response to a question from the audience. “If the president's energy policies are working, you're going to see the cost of energy come down."

If gas prices were driven by decisions made in the White House, it’s a safe bet that any incumbent president would do everything possible to drive them lower ahead of a re-election campaign. With the possible exception of the unemployment rate or the Dow Jones industrial index, it’s one of the few numbers voters care most about when they head to the polls.

But while the notion that the government could somehow control gasoline prices is appealing, the reality is that the price you pay is set daily, sometimes hourly, by market forces around the world.

That was the opinion of a group of economists polled by the University of Chicago Booth School of Business earlier this year. Asked if changes in U.S. gasoline prices over the past 10 years have predominantly been due to market factors rather than U.S. federal economic or energy policies, not a single respondent disagreed.

Recent history seems to have borne out that view. Despite the recent Bush administration's strong support for the oil and gas industry, pump prices rose from a low of about $1.20 a gallon in 2002 to a peak of $4 a gallon before crashing below $2 shortly before Bush left office in 2009 as the full force of the recession kicked in and abruptly cut demand. Shortly after Obama took office, prices began a steady climb again and kept rising, but the remain just shy of the 2009 peak.

To be sure, a handful of governments around the world, including major oil-producing nations, artificially lower pump prices through subsidies, in effect selling gas produced in state-owned refineries at a loss. In the U.S., state and federal taxes add to the price collected at the pump by gasoline retailers.

In the 1970s, the Nixon administration tried imposing gasoline price controls to tame a prolonged inflationary spiral that sent the prices of all commodities soaring and to blunt the impact of a price spike brought about by an Arab oil embargo. The result was widespread rationing and long gas lines.

U.S. energy policy has encouraged the exploration and production of crude oil, the biggest single variable in the pump price of gasoline, through tax subsidies that promote drilling. Those tax breaks, which were expanded during the Bush administration, have helped spur a boom in domestic production that has reversed a 20-year decline in U.S. output.

U.S. demand for gasoline peaked in 2007 and has been declining steadily since then. Part of the reason, as Obama mentioned in Tuesday’s debate, is that the recession cut into demand for energy. But gasoline consumption is also falling because the cars and trucks are becoming more fuel-efficient. Obama cited his administration’s efforts to drive fuel efficiency standards higher.

As domestic demand has fallen, U.S. refiners have continued to squeeze more out of each barrel of oil. If the U.S. market were a closed system, the surplus gasoline would tend to drive down prices. But the system isn’t closed. With domestic demand falling and capacity inching higher, refiners have been exporting gasoline to overseas markets. Last year, the U.S. became a net exporter of gasoline and other refined products for the first time since 1949.

Strong global demand, especially in high-growth developing countries such as China and India, has more than offset the U.S. gasoline surplus and kept gasoline prices high.

Rising production of North American crude oil, on the other hand, has helped keep gasoline prices from rising even faster. The reason: Oil producers in northern plains states and Canada can’t get their oil to the global markets where demand is strong. The result is that most of the crude produced in the U.S. and Canada sells at a steep discount to the global benchmark price.

The regional difference in pump prices has been substantial. At the end of last month, the average price for a gallon of gasoline in the Rockies was 41 cents below the U.S. average -- the biggest gap since the Energy Department began tracking regional prices in 1992.

The solution for oil producers is the controversial Keystone pipeline, which the Obama administration has delayed pending an environmental review. Romney and other proponents have argued the pipeline will help wean the U.S. off foreign imports and lower pump prices. But rather than pushing Gulf Coast prices lower, it will let oil producers charge more for their crude.

With limited access to deep water ports, Canadian oil producers have been shipping crude to American refiners, where oil stocks are already ample. Relatively tight supplies outside the U.S., meanwhile, have pushed international crude prices higher.

The solution, for Canadian producers, is a pipeline that would cross the U.S. and provide access to ports in the Gulf of Mexico, where it could be shipped to buyers around the world. That would reduce the glut of oil that has depressed U.S. prices, forcing up the cost to U.S. refiners.

That, at least, was the conclusion of the backers of the Keystone pipeline project, TransCanada Corp., which estimated in their application for Canadian government approval that the project would result in a major windfall for oil producers.

The company estimates the pipeline would boost sales of Canadian-produced crude by $2 billion to $4 billion a year, according to an assessment submitted to Canada's National Energy Board.

Like any government intervention to control prices, energy policy can have unintended consequences in a volatile global energy market. But that won't stop the candidates from trying to take credit - or assign blame - when the debate turns to the equally volatile political topic of gasoline prices.

More business news:

Follow NBCNews.com business on Twitter and Facebook