Japan issued heatstroke alerts Sunday to tens of millions of people as near-record high temperatures scorched swaths of the country, while torrential rain pummeled other regions.

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.