Lines of cars backup into roads at many of the gas stations that still have fuel. Others sit empty, with bags over the pumps or signs saying they’ve run out of fuel. That’s the scene in most of North Carolina’s big cities, where fears of a gas shortage sent people out en masse to fill up their tanks.

There is a supply crunch for fuel in North Carolina and the rest of the East Coast after hackers attacked the Colonial Pipeline, which supplies 45% of fuel to the area. The company that runs the pipeline is working to get it back up and running, and the FBI is investigating the ransomware attack.

State and federal officials are using emergency powers to get fuel out to gas stations, but the panic buying in many cities may in fact be making the shortages worse.

“People tend to over buy on the rumor and oversell on the fact,” said Winston-Salem State University economics professor Zagros Madjd-Sadjadi, who used to be the chief economist for the city and county of San Francisco.

“There’s been a huge amount of rumor about supply disruption and, of course, there is a fact about supply disruption as well. But, the thing is, the rumor is ahead of the fact,” Madjd-Sadjadi said.

Gas prices nationally hit an average of more than $3 a gallon nationally Wednesday for the first time since 2014, according to AAA. The average price in North Carolina is $2.85, the organization said.

In North Carolina, 65% of gas stations are out of fuel as of midday Wednesday, according to the website GasBuddy, which tracks gas prices.

The situation has gotten to the point in some areas that the U.S. Consumer Product Safety Commission felt the need to tweet: “Do not fill plastic bags with gasoline.”

“A lot of this is a coping mechanism. It’s a mechanism by which people are trying to exert control over a situation over which they have none,” he said, like an international criminal gang holding a gas pipeline ransom. The same could be said for the toilet paper shortage a year ago, when the global coronavirus pandemic shut down the economy.

“People fear uncertainty. They worry about whether or not things are going to last,” Madjd-Sadjadi said. “If you start seeing your friends do it, you’re more likely to engage in that type of behavior.”

“Other people are going to actually start to see this behavior, even if they don’t know about the reason, because they start seeing longer lines, they’ll start seeing gas prices start to inch up, and then they will join in. And at that point, you’ve got the equivalent of a full-on panic,” he said.

The long lines for gas from Wilmington to Asheville show just where North Carolina is. Even if a gas station gets a load of fuel in the morning, they could be out again by the afternoon because of the rush to top off the tank, Madjd-Sadjadi said.

There’s real psychological reasoning behind the knee-jerk reaction to go gas up the car or stock up on toilet paper, Madjd-Sadjadi said.

He points back to a time when people were hunter-gatherers. If the food supply was low, people sometimes had to pick up and move to make sure they could find more to eat.

But, for hunter-gatherers, and people now, the best thing to do can be to just wait it out. If people can afford to, that is. If only the people who actually needed gas were the ones filling up their tanks, the shortages probably wouldn’t be as bad. But because people are panic buying, the problem just becomes worse.

Gasoline is not toilet paper

The good news, Madjd-Sadjadi said, is that gasoline and toilet paper are very different types of goods.

Gas tanks have limited capacity, so it’s not like the toilet paper shortage last year when people could buy grocery cart loads full and store it in their garage.

“This one will probably be able to unwind much quicker than something we could of held on as a durable good,” he said.

But the shortages of gas this year and toilet paper last year do have one thing in common, Madjd-Sadjadi said. That’s the supply chain.

The modern economy runs off a system of just-in-time supplies, with companies keeping inventory low and getting new shipments more frequently.

“In normal times, this actually works beautifully,” he explains, because it helps keep costs low and goods moving through the economy. “You’re trying to squeeze out as much efficiency as possible.”

But if something happens, Madjd-Sadjadi said, “your ‘just in time’ becomes ‘never in time.’”

“You don’t stockpile, you don’t have a lot of backups. If there’s an accident, if there’s a natural disaster, if there’s a hacking event, you don’t have the built-in slack,” Madjd-Sadjadi said. And that’s where we are right now.

RELATED: Find the lowest gas prices in your area here.