A fast-moving thunderstorm knocked down trees and power lines in Falmouth on Wednesday afternoon, leading police to close sections of Foreside Road and leaving one driver trapped in his vehicle for 30 minutes.

The storm also caused power outages, and more than 2,000 Central Maine Power Co. customers were without power at 4:30 p.m., with Falmouth and Westbrook hit the hardest. As of 12:30 a.m., CMP reported that all but 49 customers in Cumberland County had electricity. All customers had power by early Thursday morning.

“It got pitch black really fast, the winds picked up, and then the heavy rains hit,” said Falmouth Fire Chief Howard Rice.

At 2:42 p.m., Falmouth police and fire dispatchers got a call that a man was trapped in his vehicle near the intersection of Depot and Foreside roads. When fire crews arrived, they found a tree had fallen onto a pickup truck and brought down power lines with it.

Rice said the man could not safely get out of his truck and waited until CMP crews arrived to shut off the power. He was trapped for about 30 minutes, but was not injured.

“He stayed in his vehicle, which was the safest thing he could have done,” Rice said.

Rice said the storm broke four utility poles in half.

Depot Road from Route 1 to Foreside Road and Foreside Road from the Portland Country Club to Skillins Greenhouse remained closed to through traffic Wednesday night, Falmouth fire officials said in a statement. The road was reopened to traffic by midnight, a fire official said Thursday morning.