Maine’s most famous lighthouse was left in the dark for a while Wednesday, after high winds knocked out power to thousands of Central Maine Power and Emera Maine customers.

At its peak, just over 3,100 CMP customers scattered across the company’s coverage area were without power midmorning, with the highest concentration in York County, where about 1,400 customers in Hollis, Limington and Waterboro were offline.

The company reported that it had restored power to most of those customers by early afternoon, although 142 customers were still without power by about 3:30 p.m.. Most those were in the town of Carrabassett Valley, where 83 customers were without power.

The winds briefly knocked out power to a portion of Cape Elizabeth, including Portland Head Light in Fort Williams.

The Coast Guard, which operates the light, said the automated lighthouse system switched to a bank of batteries to power the light. Chief Petty Officer Jeff Potter said he doesn’t know how long the light was out, but noted that the Coast Guard broadcast a message to mariners to let them know the beacon at the entrance to Casco Bay wasn’t operating. It was back online and off the battery system in a few hours, Potter said.

Emera Maine reported that the high winds and wind gusts knocked out power to about 1,600 customers as of 8:30 a.m. Wednesday. Hancock County was hardest hit, but scattered outages were also reported from Atkinson and Garland to Mount Desert Island and Blue Hill peninsula, according to company officials. By midafternoon, the utility was reporting that 60 customers were still without power.