Temperatures rose across Japan on Tuesday, climbing to near record highs around 40 degrees Celsius in a number of areas, with the weather agency warning of heat-related illnesses.

The government issued an alert covering wide areas across the country, asking people to drink water and avoid going outdoors in order to prevent heat exhaustion.

Temperatures were forecast to rise to 41 C in Kumagaya in Saitama Prefecture, north of Tokyo, 39 C in Nagoya in central Japan and 37 C in central Tokyo, according to the weather agency.

The country's record high of 41.1 C was registered in Kumagaya, Saitama Prefecture, in 2018 and was equaled in Hamamatsu, Shizuoka Prefecture, in 2020.

Among the 914 observation points nationwide, temperatures had risen to 30 C or above in 380 locations as of 9 a.m., with the mercury hitting 38.3 C in Kumagaya and 35.1 in Tokyo as of 1:30 p.m.

Countries across the globe have been battling extreme temperatures in recent weeks. The U.K. recorded over 40 C in July for the first time, while heat warnings have been issued in dozens of locations in the United States.

Portugal has reported more than 1,000 deaths due to heat-related illnesses.