Thousands of people in the Danbury area were without power for much of Tuesday afternoon after lightning hit a transmission line, officials said.

Mitch Gross, a spokesman for Connecticut Light & Power, said the lightning strike set off a chain reaction that resulted in the loss of power at six substations.

The outage affected such a wide area, Gross said, that officials could not say exactly where it occurred.

"We believe it was a lightning strike that hit a transmission line," Gross said. "That, in turn, created problems at substations in the area."

The chain reaction knocked out power to tens of thousands of customers. Customers in Danbury, New Milford, Sherman, Brookfield, Bethel, Newtown and New Fairfield were especially hard-hit.

At the height of the outage, about 58,000 CL&P customers were without power statewide, nearly 40,000 of them in the Danbury area.

Gross said he couldn't say when power would be restored to all customers, but pointed out that about 10,000 customers had service restored by about 4 p.m. -- two hours after the first outages were reported.

"It's a very methodical process that has to be done with each of these substations to make sure they're OK," he said. "We are making progress. Barring any unforeseen circumstances, we anticipate making a good deal of progress this evening."

By 9 p.m., the number of customers still in the dark was down to less than 6,000 statewide. But significant outages were still reported in Danbury and Newtown.

By 10:30 p.m., a handful of customers were still without power.

Bill Jacquemin, a meteorologist at Danbury's Connecticut Weather Center, said Tuesday's storms were caused by a cold front moving through a mass of warm, humid air that settled in the region over the weekend.

"Once the humidity was in place, it essentially boiled the atmosphere and made it very unstable," Jacquemin said. "The cold front came through and set off thunderstorms in two separate lines."

A half-inch of rain fell in Danbury in a very short period of time, Jacquemin said, causing some flooding but nothing significant. He also said little lightning was reported Tuesday.

"We didn't see a lot of lightning," he said. "It must have just been a perfect strike (to knock out power). It's been a very long time since I've seen entire towns without power. It's just kind of crazy."

At the height of Tuesday's blackout, power was out to:

3,061 customers in Bethel, 38 percent of the town.
957 customers in Bridgewater, 100 percent of the town.
7,638 customers in Brookfield, 100 percent of the town.
2,396 customers in Danbury, 7 percent of the city.
2,060 customers in Kent, 99 percent of the town.
4,136 customers in New Fairfield, 70 percent of the town.
13,759 customers in New Milford, 100 percent of the town.
2,625 customers in Newtown, 24 percent of the town.
68 customers in Ridgefield, less than 1 percent of the town.
735 in Roxbury, 55 percent of the town.
1,956 customers in Sherman, 100 percent of the town.