Cars wait in line for gas after Hurricane Sandy Wednesday. (Photograph by Bob Jagendorf/Flickr)

For residents of the states hit hardest by Hurricane Sandy, there’s a new headache in the storm’s aftermath: miles-long lines for gasoline.

The problem has been worst so far in New Jersey, but some residents of New York and Connecticut have had to wait in lines for hours, too.

Analysts stress that there’s not a gas shortage or crisis. Instead, the problems they see are that few gas stations have power (which is necessary to pump gas), and residents are panicking and sitting in the lines even when they don’t really need gas because they don’t want to risk being left without it, reported the New Jersey Star-Ledger.

“Unfortunately, that’s very typical behavior after a hurricane,” Gregg Laskoski, a senior petroleum analyst for GasBuddy, a website that tracks gasoline trends, told the paper. “Even if they know their car is going to stay parked, they still panic and go and fill up the tank. It exacerbates the problem.”

Laskoski said that adds to price hikes and makes it take longer for things to return to normal.

Some residents have been sitting in lines for hours to fill either their cars or containers they brought to fill for their generators, only to find out that the station had run out of gas by they time they got to the pump. Many drivers searched for hours to find a gas station that had power and still had gas, then sat in line for two hours, ABC News reported.

On Thursday, Fox News reported that state troopers were deployed to maintain order as customers’ tempers flared at stations along the New Jersey Turnpike and Garden State Parkway, where lines have spilled out onto the highways. Police were also called to settle several disputes about cutting in line in New Jersey towns on Wednesday.

Jackie Wong, a resident of Queens, N.Y., had no luck trying to stop for gas on her way to work on Thursday morning — and had a tough commute on top of it, facing a long backup on the Long Island Expressway.

“My local gas station in Queens was already out of gas,” Wong said. “I have not witnessed any lines at gas stations, but colleagues tell me they saw lines wrapped around the block, and that the police had to be called to attempt to keep the peace.” Wong said she now plans to take a complicated bus route to work, “until the situation gets better.”

Experts say the problem is more about resources at this point. The stations that have gas don’t have electricity, and the stations that have electricity are running out of gas.

While all of the nine refineries located in the region were affected by the “superstorm,” most were operating by late Wednesday, and the largest by capacity, Philadelphia Energy Solutions, was in excellent condition, CBS News reported. Two of the refineries were still not operating.

“Right now, we don’t have a gasoline crisis or an oil crisis or a diesel crisis. We have an electricity crisis,” Tom Kloza, chief oil analyst with Oil Price Information Service, which tracks gas prices nationwide, told the Star-Ledger. “There are few stations open, because you need to have electricity to pump gas.”

That lack of electricity and the difficulty tankers are facing with running into road barricades could lead to less supply in the coming days. Nearly half of all stations in New York City and New Jersey have been shut down because they don’t have power or gas, Fox reported.

“Hopefully the region’s fuel supply will bounce back quickly but for now, demand exceeds supply. And when that occurs, there’s only one direction for retail prices to go,” Laskoski of GasBuddy wrote in a blog post. “If you’re in the northeast, please don’t exacerbate the problem. No need to fill up a car that will remain parked at home.”