Multiple agencies are investigating the train derailment in northeast Scotland that left 3 dead and six others injured Wednesday after heavy rain and flooding hit the area.

The Crown Office and Procurator Fiscal Service will lead an investigation and will be assisted by the Rail Accident Investigation Branch and the Office of Rail and Road.

SCOTLAND TRAIN DERAILMENT KILLS AT LEAST 3: 'THIS IS A TRAGIC INCIDENT'

As the investigation unfolds, UK Prime Minister Boris Johnson said that the most important thing is that police find out what caused the derailment, "and that we all work together with Network Rail, with everyone else who is responsible" to ensure “nothing like this happens again."

Early Wednesday morning, smoke was seen billowing from the railway line near Stonehaven, about 100 miles northeast of Edinburgh, where the ScotRail service from Aberdeen to Glasgow had derailed.

Derailed carriages are seen at the scene of a train crash near Stonehaven in northeast Scotland on August 12, 2020. (Photo by Michal Wachucik / AFP via Getty Images)

Derailed carriages are seen at the scene of a train crash near Stonehaven in northeast Scotland on August 12, 2020. (Photo by Michal Wachucik / AFP via Getty Images)

Torrential rain had caused flooding and travel disruptions in Scotland, and on Wednesday morning Network Rail Scotland tweeted warnings of a landslip affecting services in the area.

However, flooding in the center of Stonehaven and the side streets leading off of it had receded and it remains unclear if the flooding was connected to the derailment, local lawmaker Andrew Bowie said after surveying the flood damage.

"We obviously don’t know why the derailment took place, but obviously we have suffered terrible weather here,” he said.

UK PLUMMETS INTO RECESSION AFTER GDP FALLS 20.4 PERCENT

Images of the wreck show several cars of the four-carriage train had left the tracks and one had tumbled down an embankment

Dozens of ambulances, at least one air ambulance and fire engines also rushed to the scene as the event unfolded.

Emergency services personnel are seen at the scene of a train crash near Stonehaven in northeast Scotland on August 12, 2020. (Photo by Michal Wachucik / AFP via Getty Images)

Emergency services personnel are seen at the scene of a train crash near Stonehaven in northeast Scotland on August 12, 2020. (Photo by Michal Wachucik / AFP via Getty Images)

British Transport Police said the driver of the train is believed to be one of the three deaths. The Rail, Maritime and Transport union said that the train conductor is also believed to have died, although formal identification has yet to take place.

AT LEAST ONE DEAD AFTER TRAIN DERAILS IN SCOTLAND

The six other injures are not considered serious, according to authorities.

British Transport Police chief superintendent Eddie Wylie said the derailed train was not a busy service, “and from (closed circuit television) inquiries and witness statements we believe all passengers have been accounted for.”

Emergency services attend the scene of a derailed train in Stonehaven, Scotland, Wednesday Aug. 12, 2020. (Ross Johnston/Newsline-media via AP)

Emergency services attend the scene of a derailed train in Stonehaven, Scotland, Wednesday Aug. 12, 2020. (Ross Johnston/Newsline-media via AP)

“However, once the area has been made safe, then a full and thorough search will be conducted, which is likely to take some time,” he said.

During initial reports, Scottish First Minister Nicola Sturgeon described the derailment as a "serious" incident.

The chief inspector of railways, Ian Prosser, said inspectors were at the site and assisting in the preliminary investigation.

Serious train accidents are rare in the U.K. The country’s last fatal derailment was in 2007.

The Associated Press contributed to this report. 

CLICK HERE TO GET THE FOX NEWS APP