With sodden gray clouds filling the sky and shielding the city from the burning summer sun, Washington's history-making heat wave, a tormenting 21-day period of temperatures in the 90s or above, finally ended yesterday.

The high temperature for the day was 87 reached at National Airport shortly after 5 p.m. It was the first day since July 24 that the high temperature failed to reach at least 90.

Any inclination toward sudden jubilation or spontaneous celebration was somewhat dampened by the day's soggy stickiness and uncomfortably high humidity. Today and tomorrow are expected to be better.

With forecasts calling for moderate temperature and low humidity, both days, according to National Weather Service forecaster Chet Henricksen, are "just going to be super."

Under clear and sunny skies, highs for the two days are expected to range from 80 to 84 degrees, Henricksen said, helping make today and tomorrow "the best weekend we've had since June."

Meanwhile torrential thunderstorms drenched the Washington area yesterday evening, filling streets and roads with swift running rivers of water.

A cool front that for more than a week had been stalled a tantalizing few hundred miles north and west of the Washington area is at last sweeping down from Pennsylvania, the forecaster explained. At the same time, he said, a high pressure area that had been anchored above Lake Superior will move into New England.

Both of these atmospheric movements are expected to bestow benefits on Washington. "It may be," Henricksen said, "that we've broken the back of this thing."

The heat wave of which he was speaking was the longest endured in Washington since the weather service began keeping records here in 1872.

On Monday, the old record, of 18 consecutive days, set in 1872, was matched. On Tuesday, the high temperature reached 93 and a new record was set. Wednesday's high temperature was 92 and Thursday's was 98.

It was excruciating, and it would probably have continued for at least one more day except for yesterday's cloud cover.

The southern fringe of the cloud mass associated with the oncoming cool front dipped down yesterday only as far as Washington. To the south of the area, temperatures were well up in the 90s.

The mercury reached 97 degrees in Richmond and 98 degrees in Norfolk.

While the historic heat wave lasted, the temperature here reached 100 degrees on two days, Aug. 8 and Aug. 11. It reached 99 once, 98 on three days and 97 once.

Although 14 of its 21 days came in August, its seven days at the end of July helped to make that month the hottest in Washington weather history.