A sign is displayed at the BP station on Hylan Boulevard in Grasmere telling motorists no fuel is available, as gas supplies run dangerously low on Staten Island in the aftermath of power outages from Hurricane Sandy. Staten Island Advance/.Anthony DePrimo

There's plenty of gasoline in the Northeast -- just not at gas stations.

In parts of New York and New Jersey, drivers lined up Thursday for hours at gas stations that were struggling to stay supplied. The power outages and flooding caused by Superstorm Sandy have forced many gas stations to close and disrupted the flow of fuel from refineries to those stations that are open.

At the same time, millions of gallons of gasoline are sitting at the ready in storage tanks, pipelines and tankers that can't unload their cargoes.

"It's like a stopped up drain," said Tom Kloza, Chief Oil Analyst at the Oil Price Information Service.

For people staying home or trying to restart a business, the scene wasn't much brighter: Millions were in the dark and many will remain so for days. As of Thursday, 4.5 million homes were without power, down from a peak of 8.5 million. The New Jersey utility Public Service Electric & Gas said it will restore power to most people in 7 to 10 days. Consolidated Edison, which serves New York City and Westchester County, said most customers will have power by Nov. 11, but some might have to wait an additional week or longer.

Superstorm Sandy found a host of ways to cripple the region's energy infrastructure. Its winds knocked down power lines and its floods swamped electrical substations that send power to entire neighborhoods. It also mangled ports that accept fuel tankers and flooded underground equipment that sends fuel through pipelines. Without power, fuel terminals can't pump gasoline onto tanker trucks, and gas stations can't pump fuel into customers' cars.

The Energy Department reported Thursday that 13 of the region's 33 fuel terminals were closed. Sections of two major pipelines that serve the area -- the Colonial Pipeline and the Buckeye Pipeline -- were also closed.

Thousands of gas stations in New Jersey and Long Island were closed because of a lack of power. AAA estimates that 60 percent of the stations in New Jersey are shut along with up to 70 percent of the stations in Long Island.

Thursday morning the traffic to a Hess station on 9th Avenue in New York City filled two lanes of the avenue for two city blocks. Four police officers were directing the slow parade of cars into the station.

A few blocks away, a Mobil station sat empty behind orange barricades, with a sign explaining it was out of gas.

Taxi and car service drivers were running dry -- and giving up, even though demand for rides was high because of the crippled public transit system. Northside Car Service in Williamsburg, Brooklyn has 250 drivers available on a typical Thursday evening. Today they had just 20. "The gas lines are too long," said Thomas Miranda, an operator at Northside.

Betty Bethea, 59, waited nearly three hours to get to the front of the line at a Gulf station in Newark, but she brought reinforcements: Her kids were there with gas cans, and her husband was behind her in his truck.

Bethea had tried to drive to her job at a northern New Jersey Kohl's store on Thursday morning, only to find her low-fuel light on. She and her husband crisscrossed the region in search of gas and were shooed away by police at every closed station she encountered.

"It is crazy out here -- people scrambling everywhere, cutting in front of people. I have never seen New Jersey like this," Bethea said.

But relief appeared to be on the way, even as the lines grew Thursday. The Environmental Protection Agency lifted requirements for low-smog gasoline, allowing deliveries of gasoline from other regions. Tanker trucks sped north from terminals in Baltimore and other points south with fuel.

A big delivery of fuel was on its way south to Boston from a Canadian refinery. Ports and terminals remained open in Connecticut, Rhode Island, and Pennsylvania, and portions of the Colonial and Buckeye pipelines are expected to re-open on Friday. Kinder Morgan Energy Partners expects to open its three terminals in New Jersey and New York over the next two days after bringing in backup generators.

And the U.S. Coast Guard opened the Port of New York and New Jersey to tankers Thursday.

Logistical problems will remain, though, for days. Barges can now visit terminals up the Hudson River and into Long Island Sound, but many of the major fuel hubs and terminals near the New York and New Jersey ports still can't offload fuel. They need to get electricity back, pump water out of flooded areas, and inspect equipment before starting operations again.

And gas stations won't be able to open up until they have power, either.

That means tanker trucks will have to travel further to deliver fuel to stations, and customers will have to drive further to find open stations.

It does not mean, however, that the region will run out of gasoline. OPIS's Kloza suspects the long lines are partly a result of panic-buying.

"This is not the Arab Oil Embargo again," he said. "There are moments when hysteria is warranted, and moments it's not. Right now, it's not."

Prices shouldn't spike like they did in the 1970s -- or even as they did before Hurricane Isaac slammed the Gulf Coast this summer. There may be a short-term increase, but gas prices should resume what has been a 6-week slide. Gasoline demand is very low at this time of year, and there's enough fuel to go around -- as soon as it can get around.

The national average gasoline price fell a penny to $3.51 per gallon Thursday, according to AAA, OPIS and Wright Express. Six weeks ago the price was $3.87.

Patrick DeHaan of GasBuddy.com, which collects gasoline prices from thousands of drivers, said prices weren't spiking in New York and New Jersey on Thursday. It was just a matter of finding stations that were open and had fuel.