TORONTO — A severe thunderstorm caused flash flooding in Toronto during the Monday evening rush hour, cutting power to at least 300,000 in Canada's largest city, shutting down subways, and leaving about 1,000 passengers stranded for hours on a commuter train filled with gushing water.

Environment Canada said some parts of the city had been drenched with more than 3.9 inches (10 centimeters) of rain in the evening storm, easily beating the previous one-day rainfall record of 1.4 inches (3.6 centimeters) in 2008.

Scores of Toronto police and firefighters used boats to rescue commuters from a 10-car, double-decker train that stalled in floodwaters that reached up to the lower windows. Murky brown water spilled through the bottom floor of the carriages, sending passengers fleeing to the upper decks. Power was shut off and the windows were opened to provide ventilation.

"There's a full-on river on either side of us... We. Are. Stuck. Hard," passenger Jonah Cait wrote on Twitter.

A Metrolinx spokeswoman told the broadcast news network CP24 that about 1,000 passengers were aboard the train. Rescue workers were pulling weary passengers through the windows about 3 ½ hours after the train got stuck.

Another passenger told CP24 that she could see people clinging to trees after abandoning their cars on a flooded highway alongside the tracks.

All of Toronto's subway service was temporarily halted due to power and signal issues. Some stations were also flooded. Partial service later resumed but large parts of the system were still shut down.

The storm left the downtown core dotted with abandoned vehicles, some sitting in water up to their windows. One woman, in a T-shirt and shorts, dove head-first through the window of her marooned car before wading away in the thigh-deep currents.

Porter Airlines canceled all flights out of the downtown airport due to power outages in the terminal Monday evening. It was not clear how many flights were affected.

As many as 300,000 Toronto Hydro customers lost power. Hydro spokeswoman Tanya Bruckmueller said efforts to restore power to customers might be slowed as night fell.

Another utility, Enersource, said power was cut to about 80 percent of Mississauga, a suburb of 700,000 west of Toronto. By around 10 p.m., only about 50,000 were without power.

Toronto's flash flooding comes two weeks after extensive flooding in Calgary turned parts of the western Canadian city into a lake and forced up to 100,000 Albertans from their homes. Three bodies were recovered during the floods.