Most of the New York City subway system was back in service by this evening's rush hour after a fierce morning storm disrupted transit service throughout much of the region and unleashed a rare and destructive tornado that whipped southwestern Brooklyn with winds of up to 135 miles an hour.

The storm dropped about 3 inches of rain on the New York metropolitan area in about an hour, flooding major thoroughfares, cutting off power to thousands of homes and causing confusion that lingered through a humid, sweaty day.

The tornado set off by the storm raged through Sunset Park and Bay Ridge, ripping the roofs off five brick rowhouses, yanking thick trees out by their roots, turning cars sideways and shattering countless windows.

According to the National Weather Service, the tornado touched down in Bay Ridge just after 6:30 a.m. and traveled northeast, damaging homes and tearing the roof off a Nissan car dealership before dissipating.

The tornado forced the evacuation of 20 buildings, leaving 32 families without shelter, the city buildings department said. Another 50 buildings experienced some damage.

On 58th Street in Sunset Park, Lanie Mastellone watched her ceilings collapse one by one. "Then when I opened the door to get out of the actual apartment," she said, "that's when I realized I had no roof."

Jeffrey M. Warner, a meteorologist at Penn State University, said that the tornado was the first one to hit Brooklyn since at least 1950, when modern record-keeping began. It was the first tornado to hit New York City since 2003, when a weak tornado touched down in Staten Island, and only the sixth tornado recorded in the city since 1950, Mr. Warner said.

Although service was restored on most subway lines by this evening - including the Nos. 4, 5 and 6 lines, and the Nos. 1, 2, and 3 lines - the V and W lines remained suspended. Shuttle buses are being run in some areas of Queens.

Service on the Metro North railroad lines was mostly restored by the afternoon, and officials with both New Jersey Transit and Long Island Rail Road said they expected service to be nearly back to normal.

Gov. Eliot Spitzer of New York o said this was the third time in seven months that a sudden downpour had brought the transit system to its knees. Mr. Spitzer ordered the Metropolitan Transportation Authority to conduct a review of how the transit system failed and urged New Yorkers to remain patient.

"The timing and intensity of the storm took us by surprise," said Elliot G. Sander, the chief executive of the M.T.A. "The intensity of the storm brought torrential rainfall in a short period of time, overwhelming both our pumps and the sewer system that is needed to accept the pump water."

As the storm knocked down power lines, more than 4,000 customers throughout the city lost power, said Alfonso Quiroz, a Consolidated Edison spokesman. Most of those customers had their power restored a short time later, and by 3 p.m., the number of customers still coping with outages had dwindled to about 800.

The destruction inflicted by the heavy rains was magnified in Brooklyn by intense winds that tore up trees and ripped apart homes and buildings. Mayor Michael R. Bloomberg and other city officials said that at least 40 buildings had been damaged, 100 to 200 cars were smashed or hit by trees, a woman in Staten Island was killed, and at least a half a dozen people were injured - sending the toll of the damages into the tens of millions of dollars.

One commuter, Pete Chiaramonte, 41, who was on his way to work at a towing company in Brooklyn this morning, said he saw what he thought was the storm touching down at around 5.30 a.m. near the corner of 37th Street and 13th Avenue. "It was a funnel shape," he said. "It looked kind of black and blue," adding, "it was way up high and came right down on the roof of" a department store. "Pieces of the roof were all over the place. It was a big bang."

Mayor Bloomberg said this afternoon that the city was being overwhelmed by a weather catastrophe that came in three parts: a blast of rain that flooded streets and railway systems, a vicious storm that tore through Brooklyn, and scorching temperatures that could be followed later today by even more rain.

"We expect very hot temperatures and perhaps some thunderstorms," he said. "One of the concerns is that you have buildings without roofs and clearly more rain would do a lot more damage to those buildings."

"Let me caution everybody," he added. "Please try to stay indoors if possible. We've opened a number of cooling centers, and 311 will tell you where they are."

Many of the weather-related injuries were broken legs and cuts and scrapes caused by shattered glass and fallen trees. The woman who was killed this morning was driving through an underpass when her car got stuck. After getting out, she was struck and killed by another car. Mayor Bloomberg said the driver of the second car had a suspended license and was arrested by the police.

"Clearly, if we hadn't had the rain storm, this woman wouldn't have been there," he said.

Even as city officials surveyed the damage and tried to clear away trees and debris throughout Brooklyn, it was still unclear precisely what had struck. John Christantello, a meteorologist with the National Weather Service office in Upton, N.Y., said the storm was "definitely one of the stronger ones we've seen," and said it was unclear whether it had reached the definition of a tornado.

But Jeff Warner, a meteorologist at Penn State University, said no tornados formed or touched down. He said 1.7 inches of rain fell in Central Park between 6 and 7 a.m., and recent hot, humid weather powered clusters of thunderstorms over Pennsylvania and lower New York State that moved through the metropolitan area.

It looked like tornado activity, a very dense black wall, almost like a heavy velvet fog," said J. R. Thomason, a fundraiser for the New York Philharmonic, who watched the storm from an attic room in a three-story house in the Kensington district of Brooklyn between 6 and 7 a.m.

"It was over very fast, within 30 seconds," he said. In a nearby street, a large tree had crushed a van and its branches stretched across the road, stopping traffic. In Brooklyn, the F train was delayed, and as trains started up again later in the morning, subway cars were way overcrowded.

Amid the commuter havoc, M.T.A.'s Web site,, shut down. It was the second time in several weeks that the Web site was not able to function during a transit crisis. The last one was during a minor blackout on the east side of Manhattan several weeks ago.

"John Han, 50, a financial adviser, said he arrived at the Fort Hamilton stop of the F train in Brooklyn at around 7:45 a.m., but about an hour later had given up and was going home.

"The cars are running, but real slow," he said, accompanied by his wife. "It looked like a sardine can. We are going home and taking a shower and going to try again, because we are very sweaty."

Around Brooklyn, motorists drove in search of an open subway line, so that they could park and take the train. In the Kensington area of Brooklyn, leaves and other debris littered the street, trash cans were knocked over, and awnings on stores were ripped. On the corner of Dahill Road and Church Avenue, trees blocked road lanes, and a 30-foot-long pizzeria sign was down on the sidewalk.

At 370 East Second Street in Kensington, Carol Perri DeSimone, a sales representative, stood amid the remains of her porch. "I'm heartbroken, my roof landed three doors away," she said. "I was scared to death." In Manhattan, the Nos. 1, 2 and 3 lines on the West Side, and the Nos. 4, 5 and 6 lines on the East Side shut down for a time. The 42nd Street shuttle was also suspended. The Metro-North Railroad reported at 8:50 a.m. that services on all three of its lines had been restored, although there were significant delays coming in to Grand Central Terminal.

Subways on the Upper West Side of Manhattan were flooded. Brandon Bunting, 31, a police officer on his way to John Jay School of Criminal Justice at 59th street and 10th Avenue, said "This is crazy," as he emerged from the subway station at 86th Street and Central Park West.

He said he had spent almost an hour on the train as it stopped and started about every 20 minutes, either in a station or between stations, and had finally given up.

Others left the station to try to catch buses or taxis.

As the storms moved across the region from west to east, Long Island was hit by winds and rains. Flooding on the tracks at Bayside, forced the Long Island Rail Road to suspend service on its Port Washington Branch early in the rush hour as torrential downpours swept through Queens and Nassau counties.

The railroad also suspended service to the Hunterspoint Avenue station in western Queens, where passengers from the railroad's diesel branches make subway connections for the east side of Manhattan.

Trains on the main line through Mineola were delayed by flooding east of the station, the railroad said in a service advisory.

The railroad seemed to have been taken by surprise by the flooding problems. Passengers were allowed to board a Manhattan-bound express train at Port Washington at the height of the storm, and then were told a few minutes after the train's scheduled 6:45 a.m. departure time that flooding at Bayside was interfering with service and that the crew did not know how long the delay would last.

The train sat in the station for more than an hour with its doors open as lightning struck nearby and the intensity of the rainstorm mounted and ebbed, then finally died away.

Around 7:45 a.m., train crew members began asking passengers whether they thought it would be worthwhile for the train to make its way as far as Great Neck, where they might be able to make connections with Queens-bound M.T.A. buses.

The railroad was trying to arrange for coaches of its own to replace suspended trains, the passengers were told, but had not yet managed to do so. Most of the passengers then gave up and walked off the train, passing under electronic signs on the platform that still, oddly, listed the next few scheduled trains on the line as operating "on time."

By late morning in the Kensington section of Brooklyn, residents were sweeping the sidewalks and streets, and firemen were putting up yellow tape around the fallen trees.

Reporting was contributed by Andy Newman, John Holusha, William Neuman, Patrick J. Lyons, Sewell Chan, Ann Farmer and Christine Hauser.