The driver who managed to strand his pickup truck on southern California railroad tracks before fleeing on foot from an oncoming train earlier this week was released from prison late Thursday as prosecutors said no charges would be filed before an investigation was complete. 

Jose Alejandro Sanchez-Ramirez, 54, of Yuma, Arizona, was released at about 9:30 p.m. local time Thursday. He was accompanied by relatives and kept his head covered under the lights of television cameras. 

Sanchez-Ramirez had been in custody since Tuesday, when authorities found him more than a mile from the site where a Metrolink commuter train slammed his abandoned truck in Oxnard. Thirty people were injured in the crash, four of them critically. 

Investigators are trying to determine why Sanchez-Ramirez turned onto the tracks before the crash. They believe he actually made a premature right turn approximately 55 feet before the street he was intending to use. Investigators also will try to determine whether he became confused in the dark by white ground markings at the railroad crossing and mistook them for the intersection, said Robert Sumwalt of the National Transportation Safety Board.

Sanchez-Ramirez would not have been the first person to make a wrong turn at the same semi-rural crossing. In 2010, a driver accidentally turned onto the tracks, was struck by a Metrolink train and injured, federal records show. That was one of six accidents in the last seven years at the crossing, including one that killed two people in a car last year.

Ventura County District Attorney Gregory D. Totten said no charges would immediately be filed, but added that the Oxnard Police Department acted properly in arresting Sanchez-Ramirez for investigation of leaving the scene of an injury accident.

Police said Sanchez-Ramirez did not call 911 and made no immediate effort to call for help. But attorney Ron Bamieh said Ramirez, who doesn't speak English well, tried to get help from a passerby, attempted to call his employer, and eventually reached his son to help him speak with police.

"I anticipate there is still a chance of charges being filed in the future," and that may depend on the state of the engineer who was critically injured in the crash, Bamieh said.

At an afternoon news conference, Sanchez-Ramirez's son, Daniel Sanchez, released a statement saying the family feels for those who were hurt.

"My father and the rest of my family are praying for everyone's speedy recovery and our concerns and thoughts are with the victims," said Sanchez, who was accompanied by his mother and other family members.

Police would not discuss drug and alcohol test results, but Bamieh said he was told there was no sign Sanchez-Ramirez was impaired.

Also Thursday, the NTSB said that a 31-year-old student engineer was at the controls at the time of the crash. With him in the cab at the time was a 62-year-old engineer with 42 years' experience, the most senior employee in all of Metrolink.

Investigators revealed that the train was traveling 64 mph when the crew saw the truck. They sounded the horn 12 seconds before the crash, when they were about 1,100 feet from the truck. They applied the emergency brakes eight seconds before the crash, when they were about 750 feet from the truck.

The train was traveling 56 mph at the moment of impact.

Sumwalt and other investigators did not give any assessment of the crew's actions.

The Associated Press contributed to this report.