Thousands of people across Maine lost power Tuesday afternoon and evening when a series of thunderstorms brought rain, powerful winds and hail as large as tennis balls that damaged car windshields in some areas, according to police and the National Weather Service.

Central Maine Power Co. reported that more than 5,700 customers had lost power at the storm’s peak around 6:15 p.m., while nearly 2,000 customers in Emera Maine’s service area were without electricity. CMP outages had dropped to 631 by 11:15 p.m., hours after the storms moved offshore, and Emera Maine had just 16 outages.

The storms also generated frequent lightning. The Cumberland County emergency dispatch center said lightning strikes started structure fires in Gorham and Windham.

The Gorham fire, in a two-story home at 95 County Road, was reported just before 6 p.m. Gorham police shut down County Road – part of Route 22 – between South Street and Deering Road, for at least an hour.

The other lightning strike hit a garage in Windham, near the intersection of Route 115 and Smith Road. The fire was reported around 4:30 p.m.

Art Cleaves, emergency management director for York County, said York and Kittery appeared to be hardest hit by the storms.

The York police station lost power briefly late Tuesday afternoon when lightning struck a nearby utility pole, said York Police Chief Doug Bracy. The outage, which lasted a few minutes, knocked out the department’s computer system, which had to be rebooted.

Police also received complaints from motorists whose windshields were damaged by hail ranging from 1 to 2 inches in diameter, Bracy said.

About 858 customers in Kittery and 172 in York lost electricity, CMP reported.

Susan Faloon, a spokeswoman for Emera Maine, said the storms swept through northern Penobscot and Aroostook counties, knocking out power to customers in Lee, Lincoln, Mattawamkeag, Winn and Littleton.

Meteorologist Chris Kimble said his office received reports of tennis ball-size hail falling over parts of York County. Kimble said Portland experienced an unusual weather phenomenon during the storms.

Kimble said ping-pong ball-sized hail – 1.5 inches in diameter – fell over parts of Portland’s North Deering neighborhood, as well as sections of Westbrook and Falmouth.

It’s unusual for storms to produce hail in Portland because air coming off the ocean is cooler and more stable than the moist, unstable air that typically generates hail, Kimble said.

The storm also knocked out power to WMTW-TV’s Westbrook studio, forcing the 6 p.m. news crew off the air.