FUJINOMIYA, Japan — The temperature in a Japanese city outside Tokyo hit a high of close to 106 degrees on Monday, a record for Japan as the country suffered under a weekslong heat wave that has also afflicted the Korean Peninsula.

With rescue workers still clearing out debris after deadly floods that hit western Japan this month, the heat blanketed a large part of the country, turning 2018 into a summer of environmental misery.

Already, 21 people have died from heatstroke in Japan, according to the Fire and Disaster Management Agency, while thousands more have been taken to hospitals for heat-related reasons, with no relief in sight for the rest of the week.