A powerful thunderstorm punctuated a sultry summer evening here yesterday, sweeping across the parched Washington area with hail, high winds and torrential bursts of rain that flooded roads, toppled trees, tied up traffic and cut off electricity to more than 20,000 homes.

With about a third of an inch of rain falling in little more than 30 minutes at National Airport, rapidly rising water surged onto low-lying streets and highways, and, in Prince George's County, three feet of water covered Rte. 50 just east of Kenilworth Avenue.

The road was closed, and traffic was backed up for miles in both directions, according to Maryland State Police. Dozens of minor traffic accidents, at least one involving as many as six cars, occurred on water-covered thoroughfares throughout the Washington area.

In the District and in Prince George's and Montgomery counties, where the intensity of the storm reached its peak, harried authorities received scores of calls reporting torn and arcing power lines, fallen trees, flooded basements and leaking roofs.

Lightning was blamed by Montgomery County fire officials for a blaze that heavily damaged a house on Longmead Drive in the Silver Spring area. Within minutes of the 6 p.m. onset of the storm, phone service was cut off to the National Weather Service's Washington forecast office. The Prince George's County police department telephone switchboard also was knocked out, and calls could be received only on emergency lines, operators said.

Shards of shattered glass littered the floor of a room housing part of the D.C. police communications center, and video display terminals were soaked with rain after wind gusts, which were measured as high as 39 miles an hour, blew out a sixth-floor window at police headquarters.

About 3,500 Northern Virginia customers of Virginia Electric & Power Co., most in the Vienna area, were without power for a time, and about 17,000 customers of the Potomac Electric Power Co., most of them in central Prince George's County, were also without electricity for part of the evening.