WASHINGTON — Millions of people without electricity struggled through the scorching heat on Saturday after a deadly string of thunderstorms whipped through the mid-Atlantic region the night before, downing trees and power lines, and killing at least 12 people, including a 90-year-old woman who died when a tree fell on her house as she slept.

The damage was most severe in the Washington suburbs of Northern Virginia and Maryland, where some residents huddled in their basements as the storm ripped through the area, blowing down trees, upending lawn furniture and tearing off roof shingles.
“It came on very suddenly,” said Laurie Singer, a resident in a heavily wooded area of Potomac, Md. Her home has large plate-glass windows, and she spent 45 minutes huddled in the bathtub, listening as the huge oak trees outside slapped against the glass.
“It was a very short burst of heavy rain and then you heard this swooshing sound, and it was the wind,” she said. “I actually felt the house shaking.”
But after the storms dissipated on Saturday, the heat set in. Temperatures soared into the triple digits in some places. With utility crews struggling, people across the mid-Atlantic faced the prospect of days without electricity.
“You could draw a line from Denver to St. Louis to Washington, D.C. All those areas are in the hundreds right now,” said Daniel Porter, a meteorologist with the National Weather Service, saying the heat was hurting the recovery effort.
Some sought refuge in movie theaters, coffee shops and malls. On Saturday afternoon, Montgomery Mall in Bethesda, Md., was jammed with people seeking air-conditioning and working lights. Dozens camped out on the floor, with laptops, iPads and cellphones plugged into sockets on the walls. In front of a few stores, the management was lending out power strips.
President Obama telephoned the governors of Ohio, West Virginia, Maryland and Virginia, all of whom declared states of emergency. Gov. Bob McDonnell of Virginia said his state had suffered the largest “non-hurricane power outage” in its history.
“This will be a multiday restoration effort,” the governor said on his Twitter feed Saturday afternoon, “very much like a hurricane restoration.”
All across the region, people tried to cope. The men’s shelter in northeast Washington where William Burrell was staying lost power and hadn’t regained it by Saturday morning. “The fans, the air-conditioning, all of it. It was burning up,” he said. “So they opened the doors to try to get some air to circulate through, but by that time, the thunderstorm had stopped, and there was the littlest, light breeze, but it wasn’t enough to cool everybody off that was in there.”
He sought relief in the Martin Luther King Public Library.
“It’s almost like a safe haven,” he said.
Julie B. Rubenstein, a lawyer who lives in Northern Virginia, said that after suffering through the night with no power and no air-conditioning, she sought refuge in her office. She described how friends who rushed to grocery stores to get bags of ice found only long lines and limited supplies. At one point, she said, a “near-fight” broke out over a bag of ice.
“It is great that I had an office I could go to,” she said, “but so many people don’t.”
In Virginia, authorities opened 90 air-conditioned shelter where residents could go to escape the heat.
There were reports of deaths from the storm and heat in New York, New Jersey, Maryland, Tennessee, Ohio and Kentucky. In Clark County, Ky., a man was killed when a tree fell on him, officials said.
In Chandlersville, Ohio, a woman died when her barn collapsed on her as she went to check on her animals.
In southern New Jersey, two young cousins were killed when a tree fell on the tent they were camping in, according to The Associated Press.
In addition to the dead, at least 20 people were injured, according to the National Weather Service.
In New York, with temperatures again vaulting into the 90s, residents braced for a possible strike by 8,500 Consolidated Edison workers over company proposals to reduce pension benefits. Officials of the union representing the workers, Local 1-2 of the Utility Workers Union of America, have said that a strike could begin as early as Sunday morning if an agreement on a new contract is not reached.
Out of 3.2 million customers in New York City and Westchester County, only 93 were without power.
For some, the damage was not life threatening, just inconvenient.
The storm forced the delay of the third round of the AT&T National golf tournament because of fallen trees on the grounds of the Congressional Country Club in Bethesda, Md. Officials said that even as play resumed, fans and volunteers would not be allowed access on Saturday. Among the problems was a 75-foot tree that had crashed across the 14th fairway.
When the storm knocked out power for an Amazon data center in Northern Virginia that hosts some popular Web sites, services like Netflix, Instagram and Pinterest went down. Most of the sites were back online Saturday afternoon.
At airports in the Washington area, power failures forced some airline workers to enter data manually, causing delays. The emergency response was also hampered in some areas where the 911 system was not functioning correctly, including in Fairfax County, Va.
Officials with the National Weather Service described the Friday night storm as “a derecho” — a long line of ferocious thunderstorms that produce a large swath of damaging winds. The storm moved from the Ohio Valley east to the mid-Atlantic states at a speed of 60 miles an hour, producing winds in some places of up to 90 miles an hour, said Mr. Porter, the meteorologist.
The hottest weather in the mid-Atlantic is expected around the Washington area, where temperatures on Friday reached 104, topping the record of 101 in 1934.
Thomas H. Graham, the president of Pepco, the utility that serves the area around Washington, said its workers were out inspecting the damage once the storm passed. But, in a statement, the company said for those without power — which includes more than half of its 788,000 customers — “the power-restoration effort is expected to take several days.” Other power companies gave similar estimates.
In McLean, Va., Debra DeShong Reed and her husband hustled their two young children, 4 and 1, into the basement to wait out the storm, which tore off a piece of their roof. “We thought it was a tornado because it came on so quickly,” she said.
Commuters were also affected. Amtrak suspended service between Washington and Philadelphia overnight. As of noon on Saturday, trains were still not rolling, stranding thousands of commuters.
At 30th Street Station in Philadelphia, passengers waited throughout the morning for word of when southbound train service would resume.
“This is horrendous,” Brian Lucy of Manhattan said as he sat on a suitcase and held his 3-year-old son, Jesse.
Mr. Lucy, 28, said his family had left New York at 3 a.m. en route to Richmond but were told when they arrived in Philadelphia that service had been suspended. “We’ve been getting different stories from everyone,” he said.
Sheryl Gay Stolberg reported from Washington, and Marc Santora from New York. Reporting was contributed by Emmarie Huetteman from Washington; Mark Landler from Bethesda, Md.; Colin Moynihan and Michael Schwirtz from New York; Peter Khoury from Philadelphia; and Nick Bilton from San Francisco.