Power was being restored to the last homes Friday afternoon in central Maine after a line of thunderstorms Thursday wracked much of the state, including northern Kennebec County.

More than 20,000 in Maine’s southern, central and coastal portions lost power during the rush-hour storm, which caused local flooding on streets in Portland and Waterville, sent trees onto roads and power lines and produced lightning that struck buildings in the region.

Central Maine Power Co. spokeswoman Gail Rice said the company’s outages peaked at 7:30 p.m. Thursday, with nearly 8,500 customers out. Emera Maine, the utility covering much of eastern and northern Maine, said 13,000 were out of power just after the storm, with Mount Desert Island hit hardest and outages extending inland into Penobscot County. Power was nearly fully restored by midday Friday.

In southern and central Maine, most outages were in Cumberland and York counties. More than 1,800 in Somerset County and 550 in Kennebec County lost power as well, which Rice attributed mostly to trees down on utility lines.

Rice said Winslow had some of the worst damage after pine trees fell on lines around Pattee Pond, broke a pole set in ledge and damaged three transformers. About 50 customers in the area still were waiting on Friday afternoon for power to be restored.

One outage during the storm was found to be unrelated to the weather: About 2,500 CMP customers in Pittston, Whitefield, Dresden, Jefferson, Newcastle, Alna, Wiscasset and Woolwich lost power for more than two hours in an outage that Rice said was traced to ospreys dropping sticks onto their nesting site atop a Wiscasset transmission line.

There was a host of other incidents in the region. Waldoboro officials told the Portland Press Herald that a fire that destroyed a barn might have started with a lightning strike, and a woman escaped injury after driving her car off the road at the Marketplace at Augusta shopping area. Police said her vision was obscured by rainfall and she missed a turn.

Sean Goodwin, interim director of the Kennebec County Emergency Management Agency, said emergency crews in Augusta, Sidney and China were chasing a lot of downed branches, but there was “nothing traumatic” and no heavy damage.

“We made out well,” he said.

Michael Shepherd — 370-7652

[email protected]

Twitter: @mikeshepherdme