Ice, water, flashlights, gas and beer.

That’s what people across Northern Virginia, Maryland and the District were stocking up on after derecho destruction.

Gas stations and grocery stores that were lucky enough to have electricity after Friday’s powerful storm were filled with swarms of sweaty residents buying ice to cool off or to save their perishable food.

But at some retailers, the freezers were empty. “We’ve been out of ice since Sunday,” said Shahzad Raja, manager of a Shell gas station in Greenbelt. The company that delivers ice to the station hadn’t responded to his calls, he said.

In Arlington County, one Walgreens was sold out of ice by Saturday. The store’s D.C. supplier lost power in the storm and couldn’t deliver a fresh batch until it froze more, a customer representative said. Inside the Walgreens, packs of bottled water and large fans were prominently displayed.

About 419,400 businesses and households in the District, Northern Virginia, and Montgomery and Prince George’s counties in Maryland had no power Monday afternoon, according to data on the utilities’ Web sites.

Trader Joe’s stores in Arlington, Bethesda and Pikes­ville donated their frozen food as they struggled with electricity, store managers said. The Arlington location was up and running by Saturday afternoon, and the Bethesda store opened Monday morning, but the Pikes­ville store was still down.

“Customers are flooding in now,” said Giuseppe Gentile, manager of the Bethesda location.

Costco stores with gas stations were largely unaffected and stayed open through the weekend. Most customers were buying water, generators and flashlights, said Lewis Bellafiore, general manager of the warehouse store in Hanover.

At an Exxon gas station near the Rockville Town Center on Saturday, vehicles were lined up for several blocks in the blistering heat.

Waiting on foot with two empty five-gallon containers was ­Gayle Day, 42, of Silver Spring.

“I drove all the way on Veirs Mill Road, and this was the only gas station open,” she said. She said she had used her car’s GPS to go from station to station — all closed.

But most gas stations and stores said business was normal Monday after the weekend rush.

Some supermarkets, such as Harris Teeter, were handing out free ice to perspiring customers.

“We had a full trailer of ice, and it’s almost gone,” said the manager of an Arlington Harris Teeter, who declined to give his name because he was not authorized by the company to speak to the news media. “People came in for water, soda, ice and chips, anything they could eat and drink.”

A Safeway in Great Falls was running on a generator, waiting for power to return.

On a blistering but breezy Monday afternoon, Peter Ramming made his way to a Clarendon 7-Eleven to buy ice. His home in the Waycroft-Woodlawn neighborhood still did not have power, so he was staying with his brother nearby. He said he chose the 7-Eleven because it was one of the few stores that had ice left.

The heat and power loss were inconvenient, he said, but the situation wasn’t a crisis.

“If it was, then there’d be people outside this shop, fighting to get in,” he said.

Lena Sun contributed to this report.