Federal investigators said a pickup truck driver who turned on to railroad tracks before a crash that derailed a California commuter train made a "mistake," while prosecutors released him from jail as they considered whether to pursue criminal charges.

"We know a mistake was made," Robert Sumwalt of the National Transportation Safety Board, the agency leading the investigation, said. "We want to figure out why."

They believe the truck made a premature right turn onto the tracks, turning 55 feet before the street the driver was apparently 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, Sumwalt said.

Jose Alejandro Sanchez-Ramirez, 54, of Yuma, Arizona, was released from jail late Thursday night, accompanied by relatives and covering his head with a jacket as television cameras focused on him.

"Their investigation is completely consistent with Mr. Ramirez's version of events," said Ramirez's attorney, Ron Bamieh. He added that there was no need for police to arrest him on a hit-and-run charge as quickly as they did because he was not a flight risk or a threat to the community.

Bamieh said his client accidentally turned onto the tracks and made repeated attempts to get the vehicle off the rails, then ran for his life as the train approached.

Thirty people were injured in the crash, four of them critically.

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.

Totten said, however, 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 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.

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.

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.