Dozens of people had to be rescued from cars submerged in floodwater on a motorway and from a caravan park hit by a landslide after heavy rain and thunderstorms swept the country.
The Scottish Fire and Rescue Service received more than 1,000 emergency calls overnight on Tuesday into Wednesday due to severe weather.
In Aberdeenshire, a train derailed near Stonehaven amid heavy rain and flooding, killing three people, including the driver, and injuring six.
In Fife fire crews were called to a “significant landslide” at a caravan park in Pettycur which affected 450 caravans.
Fire crews rescued 27 people and helped relocate 218 people from the site.
On the roads, some vehicles were recovered after they were abandoned amid flooding on the M8, which was partly closed for a time but later reopened.
Firefighters rescued 14 people after a number of cars were submerged between junctions five and six.
Ross Haggart, deputy chief officer of the Scottish Fire and Rescue Service (SFRS), said: “This has been an extremely challenging night where we received an incredibly high number of calls, making this one of the busiest nights the service has seen this year so far.
“We have particularly seen high numbers of flooding calls from the Lothian, Falkirk and Fife areas which were badly affected by serious rainfall – resulting in a significant localised response from the national service.
“Crews also attended a number of other serious incidents including road traffic collisions and fires which may have been caused by the weather.”
Rail passengers also faced disruption due to the conditions.
ScotRail tweeted that due to “extremely heavy rain” and flooding on the railway, services across the country would be delayed or cancelled.
Passengers were advised to check before travelling and consider alternative transport where possible.
SFRS said it was called to multiple reports of flooding in the Perthshire area, with many domestic properties affected.
Pictures posted on social media showed cars half-submerged in floodwater in streets in Perth.
In Fife, a landslide caused the closure of the A921 between Kinghorn and Burntisland.
Heavy flooding also affected Kirkcaldy, with cars parked at the town’s Victoria Hospital piled on top of each other after floating.
An NHS Fife spokesman said: “Our staff have worked tirelessly overnight to manage the unprecedented flooding at our Victoria Hospital site.
“It has been mainly staff, rather than patients, that have been affected by the flooding in car parks A and B and all staff have been provided with transport to get them home safely this morning after their shift.
“A recovery effort is now under way to remove the damaged cars from the car parks and support is being put in place to help those who have been directly impacted by the flooding, with planning well under way to support the scheduled return of staff on shift tonight.”
BT’s incident management team said a major outage at an exchange in Edinburgh, caused by the weather, was affecting about 100,000 customers’ broadband on BT, EE and Plusnet in the city and surrounding area.
It was reported at 6.30am and engineers were on site working on the issue.
A BT Group spokesman apologised for any inconvenience.
The Met Office has issued a yellow warning of thunderstorms for the eastern half of Scotland which is in force until midnight on Wednesday.