People are being urged to stay hydrated and look out for vulnerable people as the heat builds.
The NHS is preparing for a surge in demand from people affected by rising temperatures in England and Wales.
An extreme heat weather warning applies from Sunday until Tuesday as temperatures may peak at 35C (95F) in south, central and east England.
It means there could be a danger to life or potential serious illness.
Cabinet Office minister Kit Malthouse said the first line of defence was “behavioural change and the key thing was to “prepare” government services.
Speaking after a Cobra civil contingencies committee in Whitehall, he said it was critical that people look out for “the most vulnerable groups”.
Weather forecasts suggest “mid to high-30s” for the weekend but there is a “smaller possibility that we could exceed that and possibly hit 40 which would be an all-time record”, Mr Malthouse warned.
“The key thing we can do is prepare the government services for what may be a surge in demand – not least the health service and elsewhere”, Mr Malthouse told BBC Radio 4’s The World at One.
Temperatures are more widely predicted to be as high as 32C (90F), peaking on Tuesday, the Met Office said.
People are being urged to stay hydrated, look out for vulnerable people, keep curtains closed and stay out of the sun in the middle of the day.
The world has already warmed by about 1.1C since the latter half of the 18th century, and experts predict that temperatures will keep rising unless governments make steep cuts to emissions.
The Met Office said the hot weather was caused by high pressure over the UK and hot air flowing from southern Europe.
A heatwave spreading across Europe has fuelled wildfires in Portugal, France and Spain.
Pressures are already high on NHS services, with patients in England waiting longer for ambulances.
Figures from June show that it took an average of 51 minutes for ambulances to respond to emergencies such as heart attacks and strokes – the target is 18.
Emily Shuckburgh, professor of environmental data science at the University of Cambridge, described extreme heat as a “silent killer”.
More than 2,500 heat-related deaths were recorded in the summer of 2020, with the elderly especially vulnerable, she said.
“Climate change is meaning life-threatening heatwaves are becoming more intense and more frequent”.
Caroline Abrahams, charity director at Age UK, said older people who already struggle with significant health issues are “going to find the coming heatwave a challenge”.
She urged people to check on elderly relatives and friends during the high heat.
Teachers’ leaders fear schools may have to cancel sports days to protect students and staff during the heatwave.
Mary Bousted, joint secretary of the NEU teaching union said: “It is extremely dangerous to take part in vigorous physical activity in extreme heat, with the risk of heat exhaustion and even heat stroke.”
James Bowden, policy director for school leaders’ union NAHT, said there was no legal upper limit on school temperatures, but staff would do all they could to “mitigate the effects”.
He also called on the government to “give urgent thought” to improving school buildings, saying poorly ventilated classrooms are “inconducive to work”.
Meanwhile, the National Farmers’ Union (NFU) has warned that the extreme heat followed by months of below average rainfall is causing concern.
Richard Bramley from the NFU said the agriculture sector was “way behind” with water management and had not yet adapted to the changing climate.