Three people, including the driver, have been confirmed dead and six others were taken to hospital after a passenger train derailed near Stonehaven.
WATCH: Milestones and events of the Queen's 25,000 day-long reign
Following the tragic news, the Queen's message read: "It was with great sadness that I heard of the train derailment earlier today in Stonehaven, Aberdeenshire.
"The Duke of Edinburgh, and 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. Our thanks go out to the emergency services for their response and dedication."
It is thought the train hit a landslide after heavy rain and thunderstorms which caused flooding and travel disruption across Scotland. More than 30 emergency vehicles and an air ambulance were at the scene after the smash on Wednesday morning.
Three people were killed after a passenger train derailed
British Transport Police Chief Superintendent Eddie Wylie said: "This is a tragic incident and first and foremost our thoughts are with the families and friends of those who have very sadly died this morning.
"We remain on scene alongside our emergency service colleagues, and a major incident operation has been underway. I would like to reassure the public that this was not a busy service, and from CCTV enquiries and witness statements we believe all passengers have been accounted for.
"However, once the area has been made safe then a full and thorough search will be conducted, which is likely to take some time. I know many people will understandably have questions, and we will be working closely alongside the Rail Accident Investigation Branch and the Office of Rail and Road to establish the full circumstances of how the train came to derail."
Prime Minister Boris Johnson described the incident as "shocking" and said his thoughts are with families of those who have lost lives or been injured.
Make sure you never miss a ROYAL story! Sign up to our newsletter to get all of our celebrity, royal and lifestyle news delivered directly to your inbox.