Just days after Hurricane Harvey smacked Texas and hobbled a quarter of U.S. refining industry, the supply networks that fuel the nation's cars, trucks and airplanes began to fail.
On paper, there was no fuel shortage. The United States had more than 200 million barrels of gasoline in giant steel tanks scattered across the nation - enough to last more than three weeks.
But the fuel was unavailable to prevent shortages for two reasons: most of it is not owned or managed by the government, sitting instead in commercial facilities, and it is stored far away from where it was needed.
Consumers paid the price as gasoline spiked ahead of Harvey's arrival and jumped again after the storm as the extent of the disruption to Texas refiners became apparent.
Prices surged even higher when Hurricane Irma hit Florida, which relies on Gulf Coast supply.
That left Florida residents scrambling for fuel in one of the largest evacuations in history. Thousands of stations closed, driving high prices and long lines those remaining open. The supply chain breakdown caused delays and expense at the worst possible time for families fleeing the storm.
The shortages were felt nationally - with an average gas price spike of 10 percent - and internationally, as countries dependent on U.S. exports had to find replacement supplies.
When Harvey shut pipelines and ports that transport millions of barrels of fuel nationwide from the Gulf, it left major cities with only a few days' supply of fuel.
Pipelines started closing five days after Harvey hit, with nothing to pump through key fuel conduits from Texas to New York, Philadelphia and Chicago.
"It proves to you how vulnerable the country is to the pipelines," said Dennis Curtis who runs Curtis Oil, a fuel distributor in the Carolinas. "When they go down, it's a ripple effect all the way to New Jersey."
The storm's disruption to domestic and global fuel supplies led the International Energy Agency, the watchdog for energy security in industrialized nations, to call for a review of the way the U.S. government plans for emergencies.
A boom in U.S. fuel production has also made refineries here big suppliers to Latin America and Europe.
"The rise of the Gulf Coast as a major energy hub means that ... normal operations are too important to fail," the IEA said in a report earlier this month.
Most of the 216 million barrels of gasoline in storage in the United States is owned by refiners, traders and fuel distributors.
The stockpiles sit where holding them makes commercial sense to the firms that own them - and not where it might best help consumers during emergencies.
Oil firms try to limit storage to hold down costs, and the fuel that is stored often sits at refineries because the firms already own the land and the necessary permits.
That meant Harvey flooded many storage facilities when it hit Texas refineries, cutting them off from the pipeline network.
Another oil stockpile - U.S. government-owned crude, held in the Strategic Petroleum Reserve - is less useful for emergency supply shortages because crude needs refining.
When the SPR was established in 1975, the government's biggest concern was potential disruption of imports of Middle East crude, not post-storm fuel shortages.
After Harvey, some refineries requested crude from the SPR, which currently hold 675 million barrels. The Department of Energy (DOE) granted exchanges of more than 5 million barrels to keep refineries that were not flooded up and running, Energy Secretary Rick Perry said. FACTBOX:
The DOE also temporarily waived the Jones Act, a century-old law that limits coastal shipping of oil products to only U.S. flagged ships.
TRUMP, CONGRESS AIM TO SELL STOCKPILES
The disruption that Hurricane Sandy caused New York and the Northeast in 2012 led to the establishment of the country's only government-owned fuel reserve.
But it holds only 1 million barrels - or about enough for one U.S. rush hour morning - and is located in Massachusetts, New York and Maine. None of the fuel was released during Harvey or Irma.
After Sandy, the Department of Energy (DoE) debated where else to put reserves in the country and targeted the Southeast, which has no refineries. But the administration decided against it because it could not find affordable storage facilities to rent, said Christopher Smith, a DOE assistant secretary under former president Barack Obama.
Now, even the small Northeast stockpile may disappear: The Trump administration in May proposed selling its gasoline to help balance its proposed 2018 budget.
Trump's budget also proposed selling half of the crude in the SPR. His plan has little support in Congress, but lawmakers have previously approved selling smaller amounts from the SPR to raise money for various other priorities.
The Department of Energy, which coordinates the government response to shortages, did not respond to a request for comment about gasoline supplies after the storms.
A SLOW MARKET RESPONSE
The lack of sufficient government fuel stockpiles leaves consumers to the whims of global fuel markets after storms. And that can take time.
When fuel prices spiked in shortage areas after the recent hurricanes, cargoes of gasoline and jet fuel were shipped from Europe and Asia to the United States. Fuel distributors trucked and shipped gasoline and diesel in from other parts of the country to areas of shortage.
But the interim period was tough on consumers - even those as far from the storms as Chicago, where wholesale gasoline prices jumped about 25 cents a gallon, or 10 percent. [PRO/U]
That's because fuel terminals stopped sales to some distributors after the Explorer Pipeline shut on Aug. 29, just five days after Harvey hit. The line pumps fuel from Texas to Chicago.
Chronister Oil Co in Illinois, which supplies a convenience store and gas station chain in that state, had to reroute trucks to find fuel after its regular terminals refused to sell it, he said.
"There were incredible amounts of fear and uncertainty," said Bryce Rawers, Chronister's director of fuel supply.
Supply shortages hit consumers in other cities from Dallas to Nashville and Atlanta.
The biggest pump price shocks after both storms came in the southeastern states of Florida, Georgia, South Carolina and North Carolina, according to U.S government data.
Those four states have no refineries and few pipelines.
The market "is capable of taking care of everyone," said Angela Holland, president of the Georgia Association of Convenience Stores. "Just not today."
(GRAPHIC - After storms, nationwide shortages despite oil in storage: http://tmsnrt.rs/2y50FtJ)
(Additional reporting by Timothy Gardner in Washington; Editing by Simon Webb and Brian Thevenot)