NEW YORK — Gasoline rationing lasted eight days on Long Island, where it was lifted at midnight on Friday by Nassau and Suffolk County officials. It lasted slightly longer in New Jersey, which jettisoned the rule after 10 days.
But in New York City, rationing that was scheduled to end on Monday has been extended through Friday, even as the gas station lines that prompted it have almost disappeared.
In announcing the decision, Mayor Michael R. Bloomberg noted the major travel week ahead at a time when 30 percent of gas stations remained closed.
In a statement, Bloomberg said that he was extending the rationing ‘‘to ensure we do not risk going back to the extreme lines we saw prior to the system being implemented.’’
The 2012 version of gas rationing has been much less painful than the last time it was imposed here and across the country amid the fuel shortages of the 1970s.
Back then, rationing measures — including odd-even, which restricts gas sales to cars with odd-numbered license plates on odd days and even-numbered license plates on even days — stretched on for months and seemed to barely make a dent in the problem.
‘‘I was there in 1979 and it didn’t stop the gas lines,’’ said Sal Risalvato, who at that time owned an Exxon station in Paramus, N.J., where the lines for the pumps started 4 miles away. ‘‘What it did do was make a fair way of distributing the gas that was available.’’
As a result, Risalvato, now executive director of NJGCA, formerly the New Jersey Gasoline Retailers Association, said he was skeptical when he heard that Governor Chris Christie was imposing rationing in northern New Jersey.
‘‘I freely admit that I was wrong, and the governor was right,’’ he said.
Industry analysts, government officials, and gas station owners said one reason that rationing had worked so effectively this time was that, unlike the 1970s, there was not a nationwide shortage of gas.
Instead, Hurricane Sandy created a temporary glitch in the regional supply line by cutting off power to gas stations and damaging a distribution network of ports and terminals that delivered gas to the pumps.
They said that it should have been only a minor disruption because power was restored to stations and terminals were repaired.
But it soon evolved into a crisis in part when drivers who were not used to being told they could not fill up when they wanted began to panic and started descending upon gas stations in droves.
“By perceiving a shortage, they actually created one,’’ said Awi Federgruen, a management professor at Columbia Business School.
Federgruen added that gas station owners who responded with their own form of ad hoc rationing — such as setting a limit of 10 gallons per customer — only reinforced the feeling that there was, in fact, a limited supply of fuel.
That, he said, ultimately contributed to the long lines by forcing customers to come back for more gas and ‘‘doubling or tripling the volume of cars that need to be served.’’
The odd-even rationing countered this spike in demand, Federgruen said, by essentially dividing the population in two.
Even as gas rationing has brought relief, it has not come without a cost. Some drivers complained that it was inconvenient and others found it yet another reminder of the toll exacted on their everyday lives by Hurricane Sandy.
Pierre Lehmuller, 76, a retired New York City principal, said that the gas lines had been up to a mile long in his hamlet of Bethpage, Long Island, and at one station, they even backed up the street to block an exit ramp on the Hempstead Turnpike.
But the day after rationing was imposed, Lehmuller said, those lines were largely gone.
In New Jersey on Sunday, Vice President Joe Biden assured residents that the federal government won’t abandon them after the hurricane. Biden, who spent summers at the Jersey Shore as a boy, says he is ‘‘a homeboy’’ who understands the need to rebuild.
The vice president spent the better part of the day visiting storm-wrecked areas of the state, including the boardwalk at Seaside Heights and a damaged rail station in Hoboken.
After the storm, President Obama visited Atlantic City with Christie, and two Cabinet officers toured a Federal Emergency Management Agency facility in Middletown.
Sandy killed more than 100 people in 10 states, but hit New Jersey and New York the hardest.