Video report by ITV News Scotland Correspondent Peter Smith
Three people, including the driver and the conductor, have been pronounced dead at the scene of a train derailment in Stonehaven, Aberdeenshire, British Transport Police have said.
The third person to die was a passenger, operator ScotRail said.
A further six people have been taken to hospital after the 6.38am Aberdeen to Glasgow Queen Street ScotRail service crashed on Wednesday morning amid heavy rain and flooding.
BTP said those injured have been taken to hospital and are not thought to be seriously hurt.
ScotRail tweeted: “We’ve sadly been advised by the @BTP that, in addition to the driver and a passenger, one of the fatalities in the Stonehaven derailment was our conductor.
“Our thoughts and prayers are with the family, friends, and colleagues of those who have lost loved ones.”
Dozens of emergency service vehicles, including an air ambulance, were called to the scene at about 9.40am.
Unions called the crash a “tragedy” as a major incident was declared at Aberdeen Royal Infirmary.
It is understood 12 people were on board - six passengers and six staff - and police believe they have all been accounted for.
Police remain on the scene and an investigation has been launched.
The Queen sent a message of condolence following the rail crash.
"It was with great sadness that I heard of the train derailment,” her majesty said in a statement.
She added that the entire Royal Family “join me in sending our thoughts and prayers to the families of those who have died and those who have been injured.”
Prime Minister Boris Johnson said the fatal train derailment in Aberdeenshire must “never happen again” as he joined Scottish First Minister Nicola Sturgeon in paying tribute to the victims.
“One of the reasons that this accident is so shocking is of course that this type of accident on our railways is thankfully so rare," Mr Johnson said.
“But our thoughts are very much with those who’ve lost their lives, their families and of course those who’ve been injured in the derailment.
“I’ve talked to First Minister Nicola Sturgeon about what has happened and clearly the most important thing now is that the British Transport Police, who are in charge of the investigation, find out exactly what happened, and that we all work together with Network Rail, with everybody else who’s responsible to make sure that we… make sure that nothing like this happens again.”
Overhead images show the extent of the derailment
In a statement on Twitter, Scotland's First Minister Ms Sturgeon said: "My deepest condolences are with the loved ones of those who lost their lives in this tragic incident.
"I have just been updated by Network Rail and the emergency services on the ongoing operation. My thanks go to them, and my thoughts remain with everyone affected.
Speaking to reporters on Wednesday afternoon, transport minister Grant Shapps said it was "clearly a very, very tragic incident".
"My thoughts go out to the families the friends, all those who have been involved in what's happened today. We're still waiting for a clearer picture in terms of the number of those involved and indeed the number who have lost their lives as well."
He added: "Obviously there has been some very extreme weather and concerns about landslips. One of the things I have done today is convene emergency meetings in order to ensure that we look into that specifically along the line in other locations, just to make certain, while leaving the Rail Accident Investigation Board to do their job in the site itself."
The transport secretary is expected to visit the site on Thursday.
HM Chief Inspector of Railways Ian Prosser said: “We are saddened by today’s incident and our thoughts are with the families and friends of those affected.
“ORR inspectors are on site at Stonehaven, assisting in the preliminary investigation.
“We will work with other agencies, including the emergency services, to find out exactly what happened and identify the causes of this tragic incident.”
STV News correspondent Chris Harvey, who was at the scene, said: "The train derailed in what was atrocious conditions, it's difficult to imagine now with the sun shining behind me, just how difficult it was this morning.
"The roads around here were flooded, there was an intense thunder and lightning storm."
STV News Correspondent Chris Harvey live at the scene of the incident
There was heavy flooding in Scotland overnight which has caused travel disruption across the centre and east of the country.
Network Rail Scotland closed several lines due to landslips and flooding this morning, including the route between Dundee and Aberdeen.
RMT senior assistant general secretary Mick Lynch said: “The confirmation that there have been three fatalities in the Stonehaven derailment, including the driver and one of our conductor members, is the most dreadful news and this trade union’s thoughts are with the families, colleagues and friends of those who have lost their lives in this tragedy.
“RMT will unite to provide support, assistance and solidarity at this distressing time. Safety on the railway has to be an absolute priority and this union will be working with the various agencies to establish the facts behind this disaster which has sent shock waves right throughout our industry.”
Mick Lynch, the assistant general secretary of the Rail, Maritime and Transport union said: “The facts behind this incident will need to be established in due course but at this stage we are focused on support and assistance and our thoughts are with all those impacted by this tragedy.”
Paul Plummer, chief executive of the Rail Delivery Group, which represents the rail industry, said: “We are saddened to learn about the incident in Aberdeenshire today and our thoughts are with those affected.
“While an investigation will follow, our current focus is to provide every support we can in the immediate response.”
Labour leader Sir Keir Starmer said: “My thoughts are with everyone involved in the serious incident in Aberdeenshire.
“Thank you to all the emergency services.”
The last time a train driver was killed in a crash on Britain’s railways was in Berkshire in November 2004, the Office of Rail and Road said.
Seven people died when a train collided with a car that had been deliberately driven on to a level crossing at Ufton Nervet.