Japan has issued heatstroke alerts to millions of people as near-record high temperatures scorched swathes of the country, while torrential rain hit other regions.
The alerts come as tens of millions of people are battling dangerously high temperatures around the world as record heat forecasts hung over parts of the United States, Europe and Asia, in the latest example of the threat from global warming.
Japan's national broadcaster NHK warned viewers that the heat was at life-threatening levels, as temperatures soared to nearly 40 degrees Celsius (104 degrees Fahrenheit) in some places, including the capital Tokyo.
"Please stay hydrated and use air conditioners appropriately, and refrain from outings that seem difficult," a news presenter said.
The government issued heatstroke alerts for 20 of the country's 47 prefectures, mainly in the east and southwest, affecting millions of people.
Heat can kill by inducing heatstroke, which damages the brain, kidneys and other organs, but it can also trigger other conditions such as a heart attack or breathing problems.
Kiryu city in Gunma prefecture, north of Tokyo, saw the mercury reach 39.7C while Hachioji in western Tokyo reached 38.9C, according to the Japan Meteorological Agency.
Japan's highest temperature ever recorded was 41.1C, which was first recorded in Kumagaya city, in Saitama, in 2018 and then matched in Hamamatsu city, Shizuoka, in 2020.
Some places experienced their highest temperatures in more than four decades, including Hirono town in Fukushima prefecture with 37.3C, and hot spring resort city Nasushiobara with 35.4C, according to the weather agency's data.
Meanwhile, torrential rain continued to lash northern Japan, where flooding and at least one landslide have been recorded.
A man was found dead in a car submerged in a rice field in Akita prefecture, police said, a week after seven people were killed in similar weather in the country's southwest.
Since last weekend, a heavy band of precipitation has dumped record-breaking amounts of rain in some parts of Japan, causing rivers to overflow and sodden earth to collapse in landslides.
Japan is experiencing its annual rainy season, which often brings heavy downpours, and sometimes results in flooding and landslides, as well as casualties.
But scientists say climate change is intensifying the risk of heavy rains in Japan and elsewhere because a warmer atmosphere holds more water.
Italian cities under red alert
In Europe, Italy faces weekend predictions of historic highs with the health ministry issuing a red alert for 16 cities including Rome, Bologna and Florence.
The weather centre warned Italians to prepare for "the most intense heatwave of the summer and also one of the most intense of all time".

The mercury is likely to hit 40 degrees Celsius in Rome by tomorrow and 43C on Tuesday, smashing the record of 40.5C set in August 2007.
The islands of Sicily and Sardinia could wilt under temperatures as high as 48C, the European Space Agency warned - "potentially the hottest temperatures ever recorded in Europe".

The Acropolis in Athens, one of Greece's top tourist attractions, will close during the hottest hours again today, for the third day running.
In France, high temperatures and resulting drought are posing a threat to the farming industry, earning Agriculture Minister Marc Fesneau criticism from climatologists for having brushed aside conditions as "normal enough for summer".
This June was the second-hottest on record in France, according to the national weather agency, and several areas of the country have been under a heatwave alert since Tuesday.
There is little reprieve ahead for Spain, whose meteorological agency warned that a new heatwave tomorrow through Wednesday will bring temperatures above 40C to the Canary Islands and the southern Andalusia region.
A powerful heatwave stretching from California to Texas was expected to peak, according to the US National Weather Service, which warned of an "extremely hot and dangerous weekend".
Daytime highs were forecast to range between 10 and 20 degrees Fahrenheit above normal in the west.
Arizona's state capital Phoenix recorded 16 straight days above 43 degrees Celsius (109F), with residents facing temperatures of 43.3C (111F) yesterday, en route to an expected 46C (115F).

California's Death Valley, one of the hottest places on Earth, is also likely to register new peaks today, with the mercury possibly rising to 54C (130F).
Authorities have been sounding the alarm, advising people to avoid outdoor activities in the daytime and to be wary of dehydration.
The Las Vegas weather service warned that assuming high temperatures naturally come with the area's desert climate was "a DANGEROUS mindset! This heatwave is NOT typical desert heat".
Southern California is fighting numerous wildfires, including one in Riverside County that has burned more than 7,500 acres (3,000 hectares) and prompted evacuation orders.

Further north, the Canadian government reported that wildfires had burned a record-breaking 10 million hectares this year, with more damage expected as the summer drags on.
As torrential rains lashed northern Japan, a man was found dead in a flooded car, a week after seven people were killed in similar weather in the country's southwest.
Parts of eastern Japan are expected to reach 38-39C today and tomorrow, with the meteorological agency warning temperatures could hit previous records.

China has issued several temperature alerts, warning thermometers could reach 40-45C in the partly desert region of Xinjiang, and 39C in southern Guangxi region.
Morocco was slated for above-average temperatures this weekend with highs of 47C in some provinces - more typical of August than July - sparking concerns for water shortages, the meteorological service said.
While it can be difficult to attribute a particular weather event to climate change, scientists insist that global warming - linked to dependence on fossil fuels - is behind the multiplication and intensification of heatwaves.
The EU's climate monitoring service said the world saw its hottest June on record last month.