Thunderstorms accompanied by torrents of rain and vivid flashes of lightning swept across the Washington area last night, bringing a dramatic end to three sweltering days of near 100-degree temperatures here.

Arriving at the close of a day on which the mercury reached 98 degrees, the storms knocked out power to thousands of homes and announced the approach of cooler, less humid air that is expected to make today more tolerable and tomorrow definitely pleasurable.

Although no serious injuries were reported here, five persons were reported missing last night after their boats capsized in high winds on Chesapeake Bay, and at least 30 persons were injured throughout Maryland, most of them in the Baltimore area. What witnesses described as a tornado touched down in the Baltimore city zoo, injuring five persons and killing two caged storks and a vulture.

"It was pretty scary," said one zoo visitor. "My kids were doing pretty good until the adults started screaming and hollering," said the man, Lawrence Littleton, of Salisbury, Md. "We rushed to the elephant home. A couple of people fell and were trampled" by the crowd, he said. Zoo officials estimated damage there at $50,000.

Elsewhere in Baltimore, eight injuries were reported when high winds blew down a stage at a German festival in the Inner Harbor.

Another tornado ripped through a trailer park at Aberdeen Proving Ground north of Baltimore, injuring 10 persons. Tornadoes were also sighted in Kent County on Maryland's eastern shore and in St. Mary's County south of Washington, but no injuries or serious damage was reported in any of these.

In this area, lightning and falling trees left more than 20,000 homes and businesses without power last night. In Baltimore, the figure was more than 60,000.

Ritchie Highway in Maryland, the main route between Baltimore and Annapolis, was closed for a time by fallen trees and downed power lines. As many as five homes in Montgomery County were damaged by falling trees.

The thunderstorms, which ended a two-week dry spell here and helped drop temperatures by 22 degrees between mid-afternoon and early evening, arrived in advance of a cold front moving eastward.

While today is not expected to be cool, it will certainly be more comfortable than the previous few days, said National Weather Service forecaster Harold Hess. High temperatures will be in the 87 to 91 degree range -- closer to the upper 80 degree readings normal for this time of year -- and the humidity level will be lower. Tomorrow, with the mercury dipping into the 80s, will be "very pleasant indeed," Hess said.

The past week has been decidedly unpleasant, with temperatures over 90 on five days out of the last seven Friday's 98 degree reading matched a record for the date. Saturday was only one degree cooler, and, at 1:44 p.m., yesterday the temperature reached 98 again.

Although the record for the date -- 101 degrees, set in 1934 -- was three degrees higher than yesterday's high reading, Washingtonians appeared to find 98 degrees sufficiently insufferable.

Willie Ross sat slumped on a stone wall in Southeast Washington, and held a wet, white washcloth draped across his brow.

He was waiting for the A-8 bus, hopefully an airconditioned one, that would deliver him down Martin Luther King Avenue SE to a destination away from the oppressive heat.

Where Ross used a wet cloth, his friend Sandra Grimes had spread talcum power over her body to try to beat the heat.

Rockville resident John Daly waited in line to get tickets to an air-conditioned movie theater so that he and out-of-town relatives could pass the hours in cool comfort.

"This afternoon, I'll probably take them to some of the air-conditioned museums," Daly said.

Along Rhode Island Avenue in downtown Washington, a teen-ager stretched on a bare-mattress he had placed on the concrete pad in front of his home. An extension cord extended through the living room window let him hook up a television set and an electric fan.

"It's too hot in there," the youth said, pointing behind him to his home. "There's too many people, and it's a lot cooler being right here."

There were others who took to the outdoors for relief as well.

"The heat, oh, it's terrible," said Gwen Beach, sitting beneath a tree near 14th and P streets NW with three friends, drinking beer and eating steamed crabs.

"At night, when you sleep, it gets so hot, I can barely stand it," she said. "I have a fan that I take everywhere with me inside the house, but it only blows hot air.

"It seems to be a little cooler outside, but there's no way around the heat," Beach said, while her companions nodded in agreement. "I feel lazy, I just sort of drag around, and if I didn't cook my dinner early, it'd be too hot to cook it later."

Madeline Pleasant and her husband Brent, visitors from Charleston, W.Va. sat on their son Brian's porch in Southeast Washington. Mrs. Pleasant fanned herself with an old paper fan she had found inside.

"Drink lots of cold things and be still," Pleasant said with a smile. Then she thought a moment, and said, "and be thankful for an old-fashioned paper fan like this one. We're going to find a beach, and you can quote me on that."

Across the river from where Pleasant sat, thousands of others found some relief in the city's air-conditioned museums and galleries.

Washington resident Jayne Brown, with children Kai, and Tobi in tow, gasped as she entered the National Air and Space Museum after a long walk along the Mall.

"Boy that feels good," she said to her children as they entered the museum.

"Ughh, I forget how hot it was outside," lamented Roselyn Wagner, a tourist from Chicago, as she left the museum. "We're leaving this city tomorrow."

Not everyone tried to avoid the heat.

In Fairfax, as American Legionnaires suited up to play ball against a Royal Canadian Legion team, one player commented: "We're nuts. We came out here to sweat the booze out from last night."

At the F. Scott Key Park in Arlington, Charles Mecca, an Arlington resident, chided the Southeastern Printing Company's softball team for never showing up to play.

"It was too hot -- they couldn't take the pressure," Mecca joked.