Met Office meteorologist John Griffiths said the hottest place today was Charterhall in Berwickshire but highs of 26.2c were also seen in Edinburgh, while Glasgow was slightly cooler.
But he said: "We could quite easily see 30c in Glasgow on Thursday. This is fairly unusual and not a million miles off the June record for Scotland, which was recorded on June 18th, 1893 as 32.2c. But it's unlikely we will see this tomorrow."
Mr Griffiths said it will likely be the hottest day of the year in Scotland so far this year, with the previously highest recorded temperature being 28.9c at Dawyck Botanic Garden, near Peebles, in May.
Wednesday's weather was mixed across Scotland with heavy rain hitting the north-west Highlands and cloud across central Scotland earlier in the day - but most of this cleared up to leave sunny and dry conditions.
Thursday will be the warmest day of the week with 30c possible in areas like Glasgow, parts of the Borders and Dumfries and Galloway. Temperatures are forecast to reach 29c in Edinburgh and the Lothians and around the Moray coast in the north east of the country.
Mr Griffiths also warned the next few nights will be "muggy" with temperatures likely to be up around 17c tonight in Glasgow, for instance. Showers are expected generally overnight Thursday into Friday but it will stay warm.
Met Office yellow 'be aware' warnings for thunderstorms are also in place for the west coast of the country from 4pm on Thursday and will cover the rest of Scotland on Friday into Saturday morning. Temperatures are still expected to be high on Friday with highs of 29c possible in areas like Kinloss and Lossiemouth.
Mr Griffiths said the biggest risk from the thunderstorms, especially in urban areas, will be flash flooding and hail - with stones as big as 50p coins possible in the most extreme scenarios.
Power cuts are possible but it will depend on the severity of the lightning and how widespread it is.
The buildup of heat and its meeting with cold air from the west will lead to instability in the atmosphere and the predicted thunder and lighting on Thursday and Friday.
The weekend is expected to be unsettled across the country with both sunshine and showers expected and a bit more breeze towards the end of Sunday. Temperatures will also fall on Saturday to the high teens and low 20s and, by Sunday, most parts of the country will be down to the mid to high teens.