Storms spread across Scotland after spell of hot weather
Thunderstorms and heavy rain have reached Scotland following a prolonged period of sunshine and high temperatures across the country.
Downpours and lightning affected much of the country.
Lightning affecting signals also meant that no trains were able to run between Berwick-upon-Tweed and Edinburgh.
The Met Office issued a yellow warning of heavy rain covering most of Scotland for much of Tuesday and Wednesday.
It said there was the possibility of "widespread and energetic" storms but some parts could escape altogether.
Network Rail said it was monitoring its network across Scotland closely in order to "react to any issues quickly".
And Transport Scotland warned about possible disruption on the roads due to heavy showers and surface water.
Police in the Borders urged drivers to be aware of the change in road conditions due to the rainfall and to "drive safely and keep a safe distance".
The weather warnings came into effect first thing on Tuesday and were valid until 21:00 on Wednesday.
It is anticipated the heaviest rains could persist in north eastern parts of Scotland on Wednesday afternoon.
A Transport Scotland spokesperson said: "After a glorious spell of weather the Met Office is warning that there could be some disruption across the network today and tomorrow as a result of heavy showers.
"While not an exact science, the Met Office believe the intensity of the rain could have an impact on many areas and motorists affected should drive according to the conditions by allowing extra time for braking and be aware of heavy surface water as well as the potential for localised flooding on roads."
He added: "Transport Scotland officials are in regular contact with the Met Office, Police Scotland and other key responders and held a meeting this morning to ensure that suitable preparations are in place.
"Our multi-agency response team remains on stand-by and our operating companies are closely monitoring the situation and stand ready to respond to any weather-related issues that arise.
"Once again we've seen how quickly weather conditions can change in Scotland. We'll do all we can to minimise travel related disruption and would ask drivers and commuters play their part by planning journeys in advance using all the available traffic and travel information."