At least three people died apparently of heatstroke Friday in Japan as a heat wave continued to hit the archipelago with the temperature rising past 40 at some locations.

The three people died in Osaka, Tokyo and Chiba prefectures Friday.

Police and other local authorities announced the same day that five people died Thursday in Tokyo, Saitama and Ibaraki prefectures, bringing the death toll for that day to 17.

The latest victims are a 38-year-old woman in Fukaya, an 84-year-old woman in the city of Saitama and an 86-year-old woman in Kawagoe, police and firefighters said.

In Tajimi, Gifu Prefecture, the mercury rose to 40.8 — just slightly below the new all-time national high of 40.9 recorded the previous day in the city.

The temperature hit 37.6 in Kumagaya, Saitama Prefecture, where the mercury also recorded 40.9 Thursday.

The Meteorological Agency expects this late summer heat to start abating soon because the high-pressure ridge over the Pacific is forecast to lose its strength.

With cloudy or rainy weather forecast for the weekend in many parts of the Kanto region and northern Japan, the agency believes the intense heat in these areas has already hit its peak.