TOKYO -- More than 300 people died in July from weather-related disasters in one of Japan's deadliest months in recent years.

First came record rainfall. Disaster authorities say at least 220 people were killed early in the month by severe flooding and landslides in western Japan, with nine more still missing and presumed dead. That was followed by record temperatures topping 40 degrees Celsius. The heat has been blamed for 116 deaths.

The toll was high, even for a country prone to earthquakes, volcanic eruptions and typhoons. One of the wealthiest nations in the world, Japan has used its technological prowess to build substantial defences against natural disasters. Rivers are lined with tall walls and man-made embankments to keep them from overflowing. Skyscrapers, built on shock-absorbing systems, are designed to sway in an earthquake instead of toppling.

A big-enough disaster, though, overwhelms the defences.

------

THE RAIN

Western Japan saw historic rainfall at the end of the first week of July. Warm and humid air from the Pacific Ocean intensified a seasonal rain front, triggering torrential downpours, the Japan Meteorological Agency said. What was left of a typhoon earlier in the week added to water levels.

The death toll was the largest from a major storm since 1982, according to the Nippon.com website.

About half the victims were in Hiroshima prefecture, where the more than 100 deaths exceeded the 77 killed by landslides in the same state in 2014. Also hard-hit was neighbouring Okayama prefecture, where a river embankment collapsed in Kurashiki city, submerging neighbourhoods in one-story high floodwaters.

More than 70,000 troops and emergency workers were dispatched to distribute supplies and dig through debris to search for the missing. As of Sunday, more than 10,000 people remained in evacuation centres, unable to return home. Workers and volunteers who descended on the region to help clean up and rebuild soon faced another risk: heatstroke.

------

THE HEAT

One measure of the heat is the number of people taken to hospitals by ambulance with heatstroke symptoms. That figure more than tripled to nearly 10,000 in the second week of July and topped 22,000 in the third week before falling back to a still high 13,700 last week, the Fire and Disaster Management Agency said Tuesday.

The mercury hit 41.1 degrees Celsius (106 degrees Fahrenheit) on July 23 in Kumagaya, a city about 65 kilometres northwest of Tokyo, the highest ever recorded in Japan. The temperature reached 39 C the same day in central Tokyo.

Two lingering high-pressure systems trapped warm and humid air above the region, bringing record temperatures for about two weeks.

The blistering heat wave has also gripped neighbouring South Korea, where 26 people have died of heat-related causes in July, the Korea Centers for Disease Control and Prevention said Tuesday.

Many of the victims in Japan were elderly people who were not using air conditioning. Authorities and news media repeatedly urged people to stay inside and turn on the air conditioning. A first-grade student died on a school outing to a park.

The record heat reignited a simmering debate about how athletes and spectators will fare at the Summer Olympics in Tokyo in 2020. Organizers promised a slew of measures to combat the heat, including an early morning start to the marathon.

Associated Press writers Mari Yamaguchi in Tokyo and Hyung-jin Kim in Seoul, South Korea, contributed to this report