A van passes as strong waves strike barriers in Shizuoka City, west of Tokyo, on Thursday.A van passes as strong waves strike barriers in Shizuoka City, west of Tokyo, on Thursday. (Kyodo/Reuters)

Typhoon Melor struck Japan's main island on Thursday, killing two men and damaging buildings before turning back out to sea.

The powerful storm packed strong winds with gusts up to 160 km/h that toppled trees and power lines when it tore across the main island early Thursday.

Witnesses told local media that when the storm ripped through their communities it almost sounded like an earthquake.

At least 50 buildings were severely damaged in the storm, according to officials, and the wind tore the roofs off several homes.

The wind also forced more than 400 flights to be cancelled and toppled large trucks on highways.

At the height of the storm, the country's meteorological agency issued flash flood and landslide warnings for much of the island.

Storm waters flooded into roads and homes. Officials reported that some cars were partially submerged in the storm and the floodwater had destroyed some bridges.

TV images showed large waves crashing over storm barriers onto roads and some coastal highways were closed.

Commuters stranded

About 2.3 million commuters were affected as service on all major overland lines was also suspended in the morning, according to operator East Japan Railway Co. Strong winds forced some trains to stop midway between stations and unload passengers.

Commuters brave the rain and wind as they wait for transportation in Kawasaki, near Tokyo, on Thursday.Commuters brave the rain and wind as they wait for transportation in Kawasaki, near Tokyo, on Thursday. (Koji Sasahara/Associated Press)

A man died when his motorbike slammed into a downed tree near Wakayama on the coast and another was killed by a falling tree north of Tokyo, police said.

The usually punctual subways ran intermittently throughout the morning, according to Tokyo Metro Co.

At least 30 people were injured in the storm and more than 11,000 people were told to go to shelters, according to the Fire and Disaster Management Agency.

By Thursday afternoon, the storm had moved north of Tokyo, where skies cleared and the weather turned balmy, and was nearing Fukushima, about 240 kilometres northeast of Tokyo.

By the evening, Melor was downgraded to a tropical storm as it began to veer off the eastern coast.

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 55 km/h.

Flooding and landslides have caused at least 30 deaths since the weekend, and more than 44,000 people have been forced into evacuation centres, disaster relief officials said.

With files from The Associated Press