Gritters out to protect roads on Scotland's hottest day of the year
BBCScotland has experienced its hottest day of the year, with temperatures peaking at 31.2C in Threave, Dumfries and Galloway.
The sweltering conditions mean that Scotland is officially experiencing a heatwave - with 25C and above recorded for three consecutive days.
In the Borders, gritters have been deployed to spread sand over the main roads to try and reflect heat and cool the surface.
Soaring temperatures across the UK have led to some of the hottest June nights on record.
However conditions are likely to take a turn, as yellow thunderstorm warnings are in place in the north of Scotland between 15:00 and 23:59 on Thursday.
The Met Office issues a separate thunderstorm warning covering the whole country from midnight on Friday.
Drumalbin in South Lanarkshire and Auchencruive in South Ayrshire also hit the 30C mark, while 29C was recorded at Tyndrum in Stirlingshire.
Scottish Borders Council deployed gritting lorries to spread sand over main roads to try and reflect heat and cool the surface.
The local authority said it had closed the B6362 Lauder to Stow road due to heat damage after temperatures of 52C were recorded.
David Robertson, chief executive at Scottish Borders Council, said the local authority was not "being daft", but instead trying to protect the road surface.
"We're providing a fine layer of sand to prevent the melting of the tar.
"What we're seeing is ambient road temperatures at the height of the heat up in the 40s, and that causes the tar on the roads to melt."

Gritter lorry driver Alistair Fisher said: "We do get funny looks from people when they see us out and about gritting when it's so hot but it's needed to protect the roads.
"It's great to be out and about on a day like this but it's hot in the cab because there's no air con in a gritter."
Meanwhile, Dumfries and Galloway Council has asked residents to "spare a thought for our frontline staff" wearing personal protective equipment in the heat.

Police Scotland issued reminders about water safety and the risk of drowning from "cold water shock".
However, anglers in the south have been warned about the risks to fish when rivers warm up.
The River Tweed Commission (RTC) called for a stop to fishing salmon and trout when water temperatures reach 20C because dissolved oxygen levels puts fish under stress, meaning even careful catch-and-release angling can kill them.
Jamie Stewart, from the River Tweed Commission, said: "Wild Atlantic salmon are already facing unprecedented pressures from climate change, habitat loss and poor marine survival."
BBC Weather Watchers - Maggie D
BBC Weather Watchers - Claire WN
BBC Weather Watchers - AlanBBC Scotland weather presenter Gillian Smart said the heat would peak as southeasterly winds pull in intensely hot, humid air from the continent.
However, she warned of a "thundery breakdown" on Thursday afternoon.
"A weather front to the northwest will interact with the very warm air to produce heavy, thundery showers across the Western Isles, the Northwest Highlands and the Northern Isles," she said.
"These thundery showers will feed southwards across the country, torrential in places, and bringing a risk of hail."
The Scottish Environment Protection Agency (Sepa) put six flood alerts in place across the north of Scotland.
The agency said flooding from surface water and small watercourses is possible on Thursday evening and Friday due to heavy rain and thunderstorms in Caithness and Sutherland, Easter Ross and the Great Glen and Orkney.
Findhorn, Nairn, Moray and Speyside, Skye and Lochaber and Wester Ross are also covered by an alert.
Parts of England and Wales have a rare red warning for extreme heat in place and it is expected to be another scorching day for most of Europe.
Temperatures will once again be around 12 to 15C above average across northern Spain, France and into Belgium and the Netherlands.
Scotland 'set up for climate of the past'
Dr Vikki Thompson, climate scientist at the University of Edinburgh, said the current heatwave had come in from the tropical Atlantic.
She said the maritime origins of the heat meant it felt much hotter than previous years.

Dr Thompson said the changing climate meant temperatures would continue to increase in future years and adaptations would have to be made to existing infrastructure.
"This year and next year are expected to be particularly hot because of the conditions in the tropical Pacific, it is priming the UK and Europe for more heatwaves this year," she said.
"The infrastructure in Scotland is set up for the climate of the past and not the climate of the present and the future that we are seeing.
"So we will start to see buildings, infrastructure like hospitals and schools, struggling to keep the indoor temperature down to safe levels."
