At least five people have been killed in a ferocious storm that hammered the Northeast with powerful winds, relentless rain and historic flooding.

The nor’easter moved out to sea Saturday, but not before it knocked out power — perhaps for days — to more than 900,000 customers from the mid-Atlantic to New England.

“People in these homes need to plan for a prolonged outage,” Kurt Schwartz, director of the Massachusetts Emergency Management Agency, said Friday night. “This is a multi-day restoration event.”

The flooding is “the worst that we’ve seen in years,” said Capt. John Dougan of the Quincy, Massachusetts Police Department, which had carried out more than 250 rescues between 8 a.m. Friday and midmorning Saturday. “We’re seeing homes underwater, their basements were flooded out, the electricity was off.”

Emergency officials urged residents on higher ground to stay indoors, even after the storm pushed out.

“This is not a time to be out sightseeing and gawking, so please stay at home and stay out of our way,” James Boudreau, the town administrator for Scituate, Massachusetts, said Saturday.

Some 19 million people were still under a coastal flooding warning early Saturday afternoon.

The storm morphed Friday into a “bomb cyclone” after undergoing a rapid pressure drop known as bombogenesis. It slammed much of the Northeast with heavy snow and rain, prompting significant coastal flooding and hurricane-force gusts in New England.

Winds along parts of the Massachusetts coast that whipped in excess of 90 miles per hour are due to ease Saturday, CNN forecasters said.

The storm also dumped heavy snow from Ohio to New England and into upstate New York, where more than 3 feet was recorded.

Latest developments

• Power outages: More than 900,000 customers were without power Saturday from Virginia to Massachusetts.

• Aftermath response: The governors of Maryland and Virginia issued emergency declarations, allowing state and local agencies to help those affected.

• Flight cancellations: About 250 flights in the storm zone were canceled Saturday, according to the flight-tracking website FlightAware.com. That compares with more than 3,000 US flights scratched Friday, most at the busiest Northeast airports in Boston, Philadelphia and New York.

• Amtrak back in service: Amtrak resumed modified service at 6:20 a.m. ET Saturday, on its Northeast Corridor between Washington and New York, and planned to resume service between New York and Boston beginning at 8:40 a.m., the provider said.