"We produce more oil at home than we have in 15 years," President Barack Obama observed in his much-watched, much-covered State of the Union message. So U.S. drivers might wonder why the price demanded at their neighborhood gas station has soared by about 45 cents in recent weeks.

The usual reaction to such a rapid increase has been an irritated glance in the direction of foreign oil producers. This time, however, analysis reveals that the primary pumper-uppers of pump prices reside much closer to home. They are the nation's oil refiners, the crucial middlemen who "crack" crude oil into gasoline, heating oil, and other derivative products. (See related quiz: What You Don't Know About Gas Prices.)

A new analysis released by the Energy Information Administration, the U.S. government's energy statistics and analysis agency, suggests that "about two-thirds of the rise in gasoline prices since the start of the year" can be traced to a rise in the "crack spread," a measure of refinery profit margins. In comparison, only about 15 cents of the rise is due to worldwide increases in crude oil prices. (See related: "Pictures—Oil States: Are They Stable? Why it Matters.")

A Double Boost

Larry Goldstein, trustee and director for special projects at the Energy Policy Research Foundation, explains that refiners have enjoyed two boosts to their profits in recent years, both driven by the use of hydraulic fracking. The first is the access they now have to cheap crude oil pumped from the Eagle Ford formation in Texas and the Bakken Shale oil deposits in North Dakota. (See related story: "The New Oil Landscape.")

A second windfall is the low cost of the natural gas that powers their refinery equipment. "No one could say that refineries are not doing well," Goldstein comments. "They are doing exceptionally well. They have access to the cheapest crude available, and they sell the product at world market prices." (See related story: "Crude Reality: Gas Prices Rocket Because They Can.")

True, the price of crude plus taxes explains most of the price at the pump. "It's basically simple for the most part," Goldstein explained, "but that doesn't mean the rest is trivial. It's not." And, he notes, the "last 20 percent is complicated."

How much are refiners prospering? Houston's Phillips 66, the largest U.S. independent refiner, reported earnings from refining up fivefold in the fourth quarter of 2012; for San Antonio, Texas-based Valero, net income was up an astounding 22-fold. Large diversified oil companies like Exxon and Chevron were able to report buoyant profits despite sagging returns on oil and natural gas production, thanks to the healthy income from U.S. refineries that analysts and investors long viewed as a drag on their operations.

But refiners note that profits vary significantly across the industry and from year to year. The maintenance outages that are currently reducing capacity, many of them planned years in advance, are necessary to keep plants operating safely, says Charles T. Drevna, president of the American Fuel and Petrochemicals Manufacturers, the industry's largest trade association. "Refiners have every incentive to get back to full production as quickly as possible," he said.

Location is another important factor in profits. Regional variations in refinery capacity and limitations on moving refined gasoline between regions exacerbate price differences across the country. Pipelines from the Gulf Coast to the East Coast are limited, and the only vessels permitted to move goods between U.S. ports are those built, owned, operated, and crewed by U.S. citizens and registered under the U.S. flag. That's what is currently depriving the East Coast of the full benefit of the cheap crude produced in the middle of the country and refined along the Gulf Coast. (See related story: "With Gas Prices High, U.S. Refinery Closures Hit Workers and Drivers.") Instead, East Coast consumers must pay the higher rates that prevail on the world market.

The EIA report also points to planned and unplanned maintenance at refineries as the source of a reduction in capacity of about 9 percent. Other factors include the changeover from winter grade products to summer grade products to meet U.S. emissions requirements, and very low profit margins for refiners prior to the current run-up.

"We have had a lot of bad luck on the refining front across the country," says Phil Flynn, senior market analyst for the PRICE Futures Group. Flynn points to additional factors, including the lasting impact of Hurricane Sandy and a shift by European refineries to producing more heating oil because of an extremely cold winter. That in turn has driven up prices differentially along the East Coast given the region's reliance on imports from Europe for supply.

But not everyone is satisfied with these explanations. Marc Cooper, director of research for the Consumer Federation of America, blames bad management and financial speculation. "The market," says Cooper, "is insufficiently competitive to make people behave better and plan better."

A Gasoline Stockpile?

One way to prepare for such circumstances would be to maintain a reserve of processed gasoline. The Strategic Petroleum Reserve currently holds crude oil to protect from a disruption in supply of raw materials, but it does not store refined products to deal with a tightening of refinery capacity. Since the Reserve's creation in 1975, the U.S. Department of Energy has repeatedly studied the idea of creating a reserve of refined products, but dismissed the idea in 1977, 1982, 1989, and again in 1998.

In 2000, however, Congress created the Northeast Home Heating Oil Reserve, which now holds about two million barrels of heating oil to protect from a severe supply interruption to the region. The stockpile was tapped for the first time after Hurricane Sandy caused extensive infrastructure damage in the Northeast. Several bills that would create a national gasoline reserve have been introduced in Congress; Massachusetts Representative Ed Markey and Illinois Senator Richard Durbin, both Democrats, proposed such legislation in previous sessions. At present, there are no such bills before Congress.

Stockpiling gasoline in a reserve has been dismissed mainly because of the traditional surplus of supply available in Europe and the higher cost of storing and maintaining a reserve of gasoline compared to the cost of storing crude oil. Cooper says, "If you go back to Katrina, the Europeans were going to respond by sending some product our way. Why? They have the product reserve."

Cooper thinks the broad economic costs of refinery disruptions support giving gasoline stockpiles a try. When these disruptions occur, "we don't get cost benefit analysis. We get these remarkable stories of bad luck," Cooper says. "In this interconnected world, we need to plan for bad luck."

Private companies are unlikely to build such reserves, Goldstein points out. Stockpiling gasoline doesn't make economic sense for private firms because prices don't predictably go up in a way that would make a return on investment likely. Indeed, analysts at the EIA and elsewhere don't believe the current pressure on U.S. gasoline prices will last long. (And it's always worth recalling that, even after the recent run-up, gas prices in the U.S. remain low compared with those in European Union countries, where prices now average 1.55 euros per liter, or $7.72 per gallon.)

Flynn, for one, sees a radically different outlook for gasoline buyers down the road. "From a long-term perspective, I am freaking totally excited. I think we're at the end of an era of high gasoline prices," he says. With the U.S. on track to become one of the biggest producers of oil, and downward pressure on diesel prices as buses, taxis, and lighter duty truck fleets switch over to natural gas, Flynn foresees more refinery capacity available to process gasoline. (Related: "Natural Gas Nation: EIA Sees U.S. Future Shaped by Fracking") "That's going to take the heat off some of our refiners," he notes. And cool down tempers at the pump as well.