A powerful typhoon tore through Japan's main island Thursday, peeling roofs off houses, cutting electricity to hundreds of thousands and forcing flight cancellations before turning back toward the sea. Two men died.

During morning rush hour, more than 2 million commuters in Tokyo were stranded for hours as train services on several lines were suspended, while in other regions trucks were toppled on highways and bridges were destroyed by flash floods.

A man died when his motorbike slammed into a downed tree in the coastal prefecture of Wakayama, and another was killed by a falling tree just north of Tokyo, police said.

By evening, Typhoon Melor was downgraded to a tropical storm as it lost power over northern Japan. It was due to veer off the northeastern coast Thursday evening.

Nearly 100 people were injured and more than 11,000 people were evacuated to shelters, according to the Fire and Disaster Management Agency.

News broadcasts showed the damage left by the storm as it moved northeast across the country — partially submerged cars, large shipping containers scattered by the wind, and damaged buildings with ceilings and walls torn away. Footage also showed huge waves crashing over storm barriers onto coastal roads.

Electrical power was gradually being restored to the more than 500,000 homes, according to Japan's power companies.

Strong winds forced trains in Tokyo to stop midway between stations and unload passengers, and in some parts of Tokyo businessmen in suits rushed to work on roads alongside the dormant tracks. The usually punctual subways ran intermittently throughout the morning, according to Tokyo Metro Co.

The country's major airlines said at least 400 domestic flights and 20 international flights had been canceled.

By the evening, the storm had moved northeast of Tokyo, where skies cleared and the weather turned balmy, and was near Kamaishi, 290 miles northeast of the capital. Winds were blowing at about 67 mph, with gusts up to 100 mph.

Meanwhile in the Philippines, Typhoon Parma, which has weakened into a tropical depression, continued to buffet the northernmost region of the country with winds of 34 mph (55 kph). Flooding and landslides have caused at least 30 deaths since the weekend, and more than 44,000 people have been forced into evacuation centers, disaster relief officials said.

The latest fatalities were recorded in mountainous Benguet province, were separate landslides Thursday killed at least seven people, said Olive Luces, regional chief of the Office of Civil Defense.

Parma was the second major storm to hit the country in the last two weeks. About 317,000 people remain in evacuation centers two weeks after Tropical Storm Ketsana inundated metropolitan Manila and nearby provinces, causing the worst flooding in the capital in over 40 years. That storm left 298 people dead and 39 missing.