The driver of the train that derailed and killed 79 people in Spain was on the phone and travelling at 153 km/h — almost twice the speed limit — when the crash happened last week, according to a preliminary investigation released Tuesday.

The train had been going as fast as 192 km/h shortly before the derailment, and the driver activated the brakes "seconds before the crash," according to a written statement from the court in Santiago de Compostela, whose investigators gleaned the information from two "black box" data recorders recovered from the train.

The speed limit on the section of track was 80 km/h.

The crash occurred near Santiago de Compostela in northwestern Spain, and was the country's worst rail accident in decades. Dozens of passengers are still hospitalized for injuries.

The driver, Francisco Jose Garzon Amo, was talking on the phone to an official of national rail company Renfe when the crash happened and apparently was consulting a paper document at the time, the statement said. Garzon was provisionally charged Sunday with multiple counts of negligent homicide.

The driver received a call on his work phone in the cabin, not his personal cellphone, to tell him what approach to take toward his final destination. The Renfe employee on the telephone "appears to be a controller," the statement said.

"From the contents of the conversation and from the background noise it seems that the driver [was] consulting a plan or similar paper document," the statement said.

Investigators from the Santiago de Compostela court, forensic police experts, the Ministry of Transport and Renfe examined the contents of the two black boxes recovered from the lead and rear cars of the train.

This aerial image taken from video shows a general view of the site of a train accident in Santiago de Compostela, Spain, on Thursday July 25, 2013. Francisco Jose Garzon Amo, the train driver, has been charged with multiple counts of negligent homicide. (AP Photo)

The investigation is ongoing. The next steps include measuring the wheels on the cars and examining the locomotive, the statement said without providing an explanation for those checks. Sniffer dogs will also be used to search for human remains in the wreckage, it said.

The train was carrying 218 passengers when it hurtled off the tracks last Wednesday evening. It slammed into a concrete wall, and some of the cars caught fire. The Spanish rail agency has said the brakes should have been applied four kilometres before the train hit the curve.