By JOCELYN NOVECK and MICHAEL RUBINKAM
The Associated Press

NEW YORK — The lights were back on Saturday in Lower Manhattan, prompting screams of relief from residents who had been plunged into darkness for nearly five days by Hurricane Sandy. But that joy contrasted with deepening resentment in the city's outer boroughs and suburbs over a continued lack of power and maddening gas shortages.

Adding to the misery of those lacking power, heat or gasoline: dipping temperatures. New York City Mayor Michael Bloomberg urged older residents without heat to move to shelters, and he said 25,000 blankets were being distributed across the city.

"We're New Yorkers and we're going to get through it," the mayor said. "But I don't want anyone to think we're out of the woods."

Bloomberg also said the dangling boom of a crane damaged in the storm had been tethered to the luxury high-rise building it was on.

As for the gasoline shortages, he said resolving those could take days. Lines snaked around gas stations for many blocks all over the stricken region, including northern New Jersey, where Gov. Chris Christie imposed rationing that recalled the worst days of fuel shortages of the 1970s.

Nowhere was the scene more confused than at a refueling station in Brooklyn, where the National Guard gave out free gas — an effort to alleviate the situation. There, a mass of honking cars, desperate drivers and people on foot, carrying containers from empty bleach bottles to 5-gallon Poland Spring water jugs, was the latest testament to the misery unleashed by Sandy.

"It's chaos, it's pandemonium out here," said Chris Damon, who had been waiting for 3 ½ hours at the site and had circled the block five times. "It seems like nobody has any answers."

Added Damon: "I feel like a victim of Hurricane Katrina. I never thought it could happen here in New York, but it's happened."

Damon, 42, had been displaced to Brooklyn from his home in Queens, where he still lacked power, as did millions outside Manhattan — from Staten Island, the hardest-hit borough, to Westchester County and other suburban areas.

Domingo Isasi, waiting in a gas line on Staten Island, minced no words about the divide he perceived between Manhattan and the outer boroughs.

"The priorities are showing, simply by the fact that Manhattan got their power back," he said, adding that Staten Islanders are used to being lower on the list. "We're the ... kids who keep getting slapped in the head and told to shut up."

At a gas giveaway station in Queens, the scene was calmer but not happier. More than 400 cars stretched for more than a dozen blocks, with one tanker filling cars one at a time. A police car pulled alongside a car about 250th in line, and officers told the driver they hoped there would still be gas by the time he got there.

The 5,000-gallon trucks from the Defense Department had been sent to five sites around the New York City metropolitan area. "Do not panic. I know there is anxiety about fuel," Gov. Andrew Cuomo said.

Hours later, after the long lines formed, state officials said the public should stay away from the refueling stations until emergency responders got their gas. National Guard Col. Richard Goldenberg added, however, that those who were already at the distribution sites would not be turned away.

Gas rationing went into effect at noon in 12 counties of northern New Jersey, where police enforced rules to allow only motorists with odd-numbered license plates to refuel. Those with even-numbered plates would get their turn Sunday.

Jessica Tisdale of Totowa waited in her Mercedes SUV for 40 minutes at a gas station in Jersey City, but didn't quite understand the system and was ordered to pull away because of her even-numbered plate.

"Is it the number or the letter?" she asked around 12:10 p.m. "I don't think it's fair."

President Obama visited the headquarters of the Federal Emergency Management Agency for an update on recovery efforts and said: "There's nothing more important than us getting this right."

He cited the need to restore power; pump out water, particularly from electric substations; ensure basic needs are addressed; remove debris; and get federal resources in place to help transportation systems come back on line.

About 2.2 million people in several states remained without power, down from a peak of 8.5 million after Sandy came ashore Monday night.

About 900,000 people still didn't have electricity in the New York metropolitan area, including about 550,000 on Long Island, Cuomo said. About 80 percent of New York City's subway service had been restored, he added.

The restoration of power beat the sunrise Saturday in the West Village, barely. Electricity arrived at 4:23 a.m., said Adam Greene, owner of Snack Taverna, a popular eatery.

"This morning, I took a really long hot shower," he said.

He joked that 28th Street, above which had power, was like "Checkpoint Charlie."

"You crossed 28th Street and people were living a comfortable life," Greene said. "Down here it was dark and cold."

Throughout the West Village, people were emerging from their hibernation, happy to regain their footing. Stores started to reopen. Signs at a Whole Foods Market promised that fresh meat and poultry and baked goods would return Sunday.

Aida Padilla was thrilled that the power at her large housing-authority complex in Chelsea had returned late Friday.

"Thank God," said Padilla, 75. "I screamed and I put the lights on. Everybody was screaming. It was better than New Year's."

New York City's parks reopened Saturday, and with Sunday's New York City Marathon canceled, many of the runners who had come to town for the race worked out their frustrations with a jog through Central Park, the site of the finish line that won't be used.

In his first comments since canceling the marathon, Bloomberg said he'd fought to keep it going, but the controversy was becoming "so divisive" and too much of a distraction.

"I still think that we had the resources to do both," Bloomberg told WCBS-TV during a visit to Queens. As he spoke, he was met by catcalls from residents angry about the city's response to the storm.

Many runners understood the decision, especially with the U.S. death toll from the storm at 107, including 41 in New York City.