Unseasonably hot conditions gripped wide areas of Japan on Sunday, with the town of Saroma in Hokkaido setting the highest temperature ever recorded in the country for the month of May.

Two men — one in Shimizu, Hokkaido, and the other in Tome, Miyagi Prefecture — died and at least 575 people nationwide were taken to hospitals by ambulance suffering from symptoms that appeared to point to heatstroke, according to data compiled by Kyodo News.

The mercury hit 39.5 degrees in the northeastern coastal Hokkaido town at 2:07 p.m. Sunday — the hottest at any observation point in Japan for the month, according to the Meteorological Agency. The previous record, set on May 13, 1993, was 37.2 degrees in Chichibu, Saitama Prefecture.

Temperatures had never before reached 35 C in Hokkaido in May or 38 C at any time of the year in the prefecture. The previous record high temperature recorded there was 37.8 degrees in the town of Otofuke on June 3, 2014, and in the city of Obihiro on July 12, 1924.

Temperatures climbed to 38.8 degrees in Obihiro and in the town of Ikeda on Sunday. The agency issued high temperature warnings across wide areas, from Hokkaido to the Kinki region, and called for caution against heatstroke.

Hokkaido Railway Co., or JR Hokkaido, canceled the operation of a number of trains, mainly those departing from and arriving at stations in the eastern part of Hokkaido, due to fears of rail distortion by the strong heat wave.

On Sunday, temperatures reached 35.8 degrees in Hatoyama, Saitama Prefecture, 35.7 degrees in Date, Fukushima Prefecture, 35.5 degrees in Daigo, Ibaraki Prefecture, and 35.4 degrees in Kiryu, Gunma Prefecture, according to the Meteorological Agency. Temperatures rose above 30 degrees also in Chiba, Tottori, Fukuoka and Yamanashi prefectures.

The weather agency expects the unusually hot conditions to continue Monday.