(Reuters) - A lawyer for the driver whose truck was hit by a California commuter train in a wreck that injured 50 people said on Wednesday the crash was an accident and that his client left the scene only to try to find help.

Jose Alejandro Sanchez-Ramirez, 54, was found walking and "in distress" more than a mile from the accident on Tuesday and was later taken into custody on suspicion of felony hit-and-run for leaving the scene.

Police say they are investigating whether drugs or alcohol were a factor in the case.

"What we've found in the time we've had this case is that this was an accident, all this was an accident," Ron Bamieh, an attorney for Sanchez-Ramirez, told a press conference Wednesday.

Bamieh confirmed his client had been arrested for driving under the influence of alcohol in 1998 but said there was no indication he was intoxicated at the time of the rail crash.

The attorney also denied Sanchez-Ramirez had walked away from the destruction to avoid responsibility, saying he had found police officers.

"The reality is he basically freaked out trying to help people," Bamieh said. "Did he do everything like James Bond? No, he did the best he could. He's an average guy."

The crash in Oxnard, about 45 miles northwest of Los Angeles, flipped over three double-decker Metrolink rail cars and derailed two others. It tore apart the Ford pickup truck that Ramirez apparently abandoned on the tracks after making a wrong turn in the pre-dawn darkness.

The crash took place where the Metrolink tracks cross busy Rice Avenue, which is used by a steady stream of trucks.

The crossing was a known transportation hazard and the scene of a fatal accident as recently as last year, raising questions about why a highway overpass has not been built.

Four people, including the operator of the Los Angeles-bound train, remained in critical condition.

Oxnard Assistant Police Chief Jason Benites said on Tuesday the driver had undergone unspecified tests at a hospital. He declined to comment on the results of those tests.

Ventura County prosecutors said they expected to file formal charges against Sanchez-Ramirez on Thursday before his initial court appearance.

The Los Angeles Times reported on Wednesday that he had a history of vehicle infractions in Arizona, including pleading guilty in 1998 to violations including driving with a blood alcohol content above the state's legal limit.

He also pleaded guilty to failure to obey a police officer, having liquor with a "minor on the premises" and having no insurance, the Times reported.

In 2004, Sanchez-Ramirez was convicted of a driving infraction in Yuma, Arizona and was cited for failure to obey a traffic control device in 2007, according to the newspaper.

A National Transportation Safety Board member has said Ramirez' heavy-duty pickup truck appeared to have traveled about 80 feet (24 meters) down the tracks before being hit by the train in the fiery pre-dawn accident.

Metrolink officials said full service was scheduled to resume on Thursday afternoon on the agency's Ventura County line after repairs to the tracks.

(Additional reporting by Daniel Wallis and Dan Whitcomb; Writing by Dan Whitcomb; Editing by Cynthia Johnston and James Dalgleish)