The D.C. region faced power outages, downed trees and flooded roadways as heavy rains swept through the area Wednesday night and into Thursday morning, dumping up to three inches of rain in some parts, before the weather turned sunny and dry by lunchtime.

The Post’s Capital Weather Gang said rainfall totals in a 24-hour period showed much of the D.C. area received 1 to 3 inches, with parts of Frederick County getting more than 4 inches of rain. On Thursday after the morning showers, the rainfall totals at the airports were 1.64 inches at Reagan National, 1.60 inches at Dulles and 0.98 inches at BWI Marshall, according to CWG.

During Thursday morning rush hour, Maryland, Virginia and D.C. officials warned drivers and pedestrians to use caution and allow extra time, as dozens of roads were closed due to flooding and downed trees. There were no reports of any major injuries.

In D.C., all lanes of the westbound side of Military Road near Beach Drive NW were closed because of a downed tree.

Officials in Virginia said there were at least a dozen reports of high water on roads in the Franconia, McLean and Reston areas. Ian Crawford, a traffic reporter for WTOP, said I-66 in parts looked “like a fishing pond.”

In Maryland, part of Route 355 south was closed near Urbana Parkway in the Ijamsville area of Frederick County because of flooding. Crews closed Beach Drive near Cedar Lane in Maryland after Rock Creek “overflowed its banks,” and rescuers had to help a driver whose vehicle got stranded in high water on Beach Drive near Connecticut Avenue in the Kensington area, according to Pete Piringer, a spokesman for Montgomery County Fire.

Frederick County Public Schools closed for the day because of the bad weather and parts of the area being under flood watches and warnings. Public schools in Carroll County opened two hours late because of the weather.

About 5,000 customers in Maryland and Virginia were without power.

In Maryland, about 1,400 customers of Pepco in the National Harbor area were without power early Thursday. Virginia had about 4,100 customers of Dominion Energy without power early Thursday, mostly in the Arlington, Alexandria and Annandale areas.

By the afternoon, there were mostly sunny skies in the region with temperatures in the 70s, according to the CWG. For Friday, forecasters said there would be sunny and dry with temperatures in the low- to mid-70s.