Media playback is unsupported on your device
A major incident has been declared in Fife after torrential rain and thunderstorms battered many parts of central and eastern Scotland.
Emergency services said 28 people were rescued after a landslide at Pettycur Bay Holiday Park.
That also resulted in caravans being evacuated and 218 people spending the night in emergency accommodation.
A number of homes have also been flooded and many schools in the area are closed.
It comes as emergency services were called to a train derailment near Stonehaven. The alarm was raised at about 09:40 and emergency crews remain at the scene.
Image caption Smoke is billowing at the sceneFollowing heavy rain and thunderstorms overnight there are also reports of homes in North Lanarkshire and Perthshire being flooded.
Scotrail said lightning strikes had also caused power outages and disruption across the network.
Fife's Local Resilience Partnership (LRP) was activated following a number of incidents across the Kingdom.
After a major landslide at Pettycur Bay Holiday Park, 28 people had to be rescued in the early hours with 218 people evacuated from their caravans overnight and given emergency accommodation.
Police, fire and council services are currently dealing with flooding issues in Freuchie, Cairneyhill, Cardenden, Kinglassie, Culross and Lochgelly. As a result, a number of road closures are in place and local diversions are in operation.
A number of people have been evacuated from their homes, and various schools and roads are closed across the Kingdom. The main East Coast rail line is also closed due to the landslide.
Image copyright Stuart D Image caption Flooding at Victoria Hospital in Kirkcaldy saw cars piled on top of each other Image copyright Rachel Finlayson Image caption The water was at its deepest at Victoria Hospital in Kirkcaldy overnightSuperintendent Sandy Brodie from Fife's LRP said: "Public services are working together to deal with this incident and taking guidance from public health to make sure all current guidance is being followed when supporting those affected.
"I want to reassure residents that we are working to get services back up and running as quickly as possible and will continue to monitor the situation. In the interim, I would ask people not to travel unless absolutely necessary."
Overnight flooding at Victoria Hospital car park was an unwelcome surprise for NHS staff coming off night shift.
'Recovery effort'
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."
Image copyright Arnie Mackay Image caption Streets were flooded in Perth as heavy rain swept across the areaThe Scottish Fire and Rescue Service said it was called to multiple reports of flooding in the Perthshire area, with many domestic properties affected.
Perth and Kinross Council said several roads in the area were still impassable due to flooding.
Image copyright Phil976 Image caption Lightning lit up the skies over EdinburghThunderstorms and torrential rain caused travel chaos for people in the North-east. Many schools, which were due to open for the first time in five months, have remained closed.
The intensity of the rainfall left the drainage system on many roads in Aberdeenshire unable to cope, leading to huge pools of standing water.
A number of residents in Aberdeen became trapped by the rising water and had to be rescued by dinghy.
Several Schools, including three academies in Aberdeenshire are shut.
Dozens of rail services to and from the North-East have been cancelled.
A major clean up operation was under way in Stonehaven after streets in the city centre were flooded in the early hours. One business, the Carron Fish & Chip Bar was completely under water. The owners said it was their fourth flood in nine years and it had caused extensive damage.
A Met office yellow weather warning for thunderstorms is in place from 15:00 to 21:00.
It warned that some places were likely to see "further severe thunderstorms", but with "significant uncertainty in location and timing".
The warning covers southern, central and northern Scotland.
Meanwhile, the Scottish Environmental Protection Agency (Sepa) issued flood warnings for Aberdeenshire, Dundee and Angus and Tayside.
Image copyright Met Office Image caption The updated Met Office warning for WednesdayThe fire service said a number of homes were flooded in Airdrie, while they also attended flooding on the M8 after the dual carriageway was inundated with water between junctions five and seven.
Police were advising people to avoid the area completely as diversion routes were also becoming flooded and impassable.
A Police Scotland spokesman said: "We were made aware of flooding on the M8 between junctions 5 and 6 in Lanarkshire shortly before 4am on Wednesday, 12 August.
"No injuries have been reported and officers have assisted partner agencies."
'Car is a write-off'
Matty Gale, from Lincolnshire, said he woke up in his hotel in Falkirk to find his car under water.
He told the BBC: "I think my car is pretty much a write-off now. The water is up to the wheels. I can hear car alarms going off - the water has got into the electrics. I couldn't get a wink of sleep last night because of how loud the thunder was and the lightning was blinding.
"I might have to get the train home."
Image caption A house in Reddingmuirhead had its roof damaged when lighting struck at about 04:00A family home in Reddingmuirhead near Falkirk was badly damaged after being struck by lightning.
The house lost its roof after catching fire shortly before 4am. Residents say the family escaped unhurt but "have lost everything."
It's thought a butcher's business in the nearby village of Brighton's was also hit by lightning around the same time.
A processing unit beside the butcher's shop was destroyed.
Image copyright @BBCWthrWatchers/ JaneyMac Image caption Roads were flooded around Duthie Park in AberdeenThe thunderstorms also saw;
The fire service control room in Edinburgh said they had received more than 500 calls through the night amid widespread thunder and lightning and torrential rain.All flights due to land at Edinburgh Airport are being diverted or delayed. 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 06:30 and engineers were on site working on the issue.And Highland Council said it was having "major issues" with internet and network issues following the thunderstorms. It said the problems affecting its sites and home working access were due to the flooding of the exchange in Edinburgh. Image copyright Cazzalad1801 Image caption Torrential rain brought flooding to eastern parts of ScotlandIn addition, Sumburgh Airport was closed to all arriving and departing aircraft on Wednesday morning due to the adverse weather conditions but remained open for emergency flights.
In Perth, heavy rain caused flooding which affected the city's railway station.
ScotRail posted pictures of the water covering the tracks on social media.
Some routes were not operating trains at all.
At 09:25, ScotRail said there were no trains operating on the following routes:
Edinburgh - Fife Edinburgh - Glasgow Queen Street via Falkirk High & Grahamston Edinburgh/Glasgow - Dunblane Edinburgh - West Calder Aberdeen - Edinburgh/Glasgow Aberdeen - Dyce Inverness - Perth