Scotland records hottest night ever
Scotland has recorded its hottest night ever, after temperatures fell to only 20.9C (69.62F) in Achnagart, north-west Scotland.
After Edinburgh registered the hottest day of 2019 at 31.6C (88.9F) - the city's hottest day ever - the heat continued overnight on Thursday.
The previous record for the warmest night was 20.5C (68.9F).
Parts of Scotland saw thunderstorms after a yellow weather warning was issued.
Friday was expected to be cooler than Thursday, with temperatures ranging from 23C to 25C in most areas (73F to 77F), rising to 27C in south-east England.
Along Scotland's Moray Firth coastline the temperatures were expected to range from 25C-27C (77F-80.6F).
The previous record for July was 36.7C (98F.
This temperature comparison tool uses three-hourly forecast figures. For more detailed hourly UK forecasts go to BBC Weather.
If you can't see the calculator, tap here
Edinburgh's previous record temperature was 31.4C (88.5F) recorded in 1975.
BBC Scotland weather presenter Kirsteen Macdonald said: "The July record for Scotland is 32.8C (91.04F) which was recorded in Dumfries, way back in 1901 and 1908 respectively."
Current record temperatures across the UK are:
- Scotland: 32.9C (91.2F) in Greycrook, Borders on 9 August 2003
- England and UK: 38.5C (101.3F) in Faversham, Kent on 10 August 2003
- Wales: 35.2C (95.4F) in Harwarden Bridge, Flintshire on 2 August 1990
- Northern Ireland: 30.8C (87.4F) in Knockarevan, County Fermanagh on 20 June 1976 and Shaw's Bridge, Belfast on 12 July 1983
- Latest updates as UK temperatures soar
- Second Europe heatwave set to intensify and peak
- 10 tips for sleeping in hot weather
A Met Office yellow warning was in place from 15:00 on Thursday into early Friday morning for thunderstorms and possible travel delays, flash flooding, and power cuts.
Is the heatwave caused by climate change?
While extreme weather events like heatwaves occur naturally, "research shows that with climate change they are likely to become more common, perhaps occurring as regularly as every other year", the Met Office says.
It conducted a study last year that found that the UK was now 30 times more likely to experience heatwaves compared with the year 1750, because of "the higher concentration of carbon dioxide (a greenhouse gas) in the atmosphere".
Records going back to the late 19th Century show that the average temperature of the Earth's surface has increased by about one degree since industrialisation.
A climatology institute in Potsdam, Germany, says Europe's five hottest summers since 1500 have all been in the 21st Century.
Scientists are concerned that rapid warming linked to use of fossil fuels has serious implications for the stability of the planet's climate.
Meanwhile the dangers of cooling off in lakes, rivers and the sea were highlighted after six youths were rescued from the River Dee in Aberdeenshire after getting into difficulty.
Scottish Fire and Rescue Service teams from Aberdeen and Dundee were called out to Potarch Bridge just after 20:30 on Wednesday after water levels rose, leaving the youths unable to get back to shore.
The teams used an inflatable rescue sled to bring them to safety by about 22:15.
Network Rail Scotland urged passengers to stay hydrated while travelling on trains, reminding them that there are free drinking fountains at Waverley and Glasgow Central Stations.
And passengers travelling by train to Glasgow and Edinburgh from London faced delays, which were attributed to heat-related incidents in the south of England.
London North Eastern Railway, which operates the East Coast Main Line franchise, advised customers against travel for the rest of the day as record high temperatures caused "several incidents" on the East Coast route.
This included problems with infrastructure in the Peterborough area which led to LNER services in and out of London King's Cross being cancelled.
The Rail Delivery Group, which represents train operators and Network Rail, warned problems on the railways could continue until the weekend.
The Scottish SPCA also tweeted warnings asking people to reconsider leaving their dog in the car while they are out and about.