FRA Certification Helpline: (216) 694-0240

(The following story by Randal C. Archibold appeared on the New York Times website on October 1.)

LOS ANGELES — The engineer of a commuter train that collided last month with a freight train here, killing 25 people and injuring more than 130, was sending text messages on his cellphone seconds before the crash, federal investigators said Wednesday.

But the authorities have not determined whether the engineer was sending messages when his train failed to stop for a red signal, leading to the collision. Investigators were working to correlate the time on the phone with train and signal recorder data. The last message the engineer received was at 4:21:03, more than a minute before impact, and the final one he sent was at 4:22:01, just 22 seconds before the trains, traveling at about 40 miles an hour, collided.

The National Transportation Safety Board, which is investigating the Sept. 12 accident involving the Metrolink commuter train and a Union Pacific freight train in the San Fernando Valley, said it confirmed the texting through the engineer’s cellphone records.

It said the engineer, Robert M. Sanchez, 46, who was killed in the crash, sent text messages throughout his shift, a split tour of duty. On the first part, he operated the train from 6:44 a.m. to 8:53 a.m., and received 21 text messages and sent 24.

On the second part of the shift, which lasted from 3 p.m. until the time of the crash at 4:22, Mr. Sanchez sent five messages and received seven. It was unclear with whom he was texting, but a few teenagers who describe themselves as rail buffs told a television station that shortly before the crash they had exchanged messages with Mr. Sanchez, who unlike the Union Pacific engineer never applied the brakes.

Investigators have obtained the teenagers’ cellphone records and interviewed them. But Terry N. Williams, a spokesman for the safety board, said it would have no further comment on the investigation, beyond its statement. A Metrolink spokesman also declined to comment.

The cause of the crash has not been determined but investigators have said the tracks, signals, brakes and locomotives were operating normally.

The prospect of an engineer distracted by his cellphone alarmed regulators. The California Public Utilities Commission, which oversees rail safety, issued an order less than a week after the crash barring train operators from using cellphones other than for emergencies or unless the train is stopped and managers give permission. The Federal Railroad Administration said Wednesday that it would issue an emergency ban on the use of personal electronic devices.

The commission said it acted in response both to the Metrolink crash and an accident on June 14 on a light rail line in San Francisco that injured a dozen people and might have resulted from inappropriate use of a cellphone. Metrolink has said it forbids cellphone use while operating trains.

Michael R. Peevey, president of the state Public Utilities Commission, said that Mr. Sanchez’s cellphone use is “very, very sad but I think we suspected from the very beginning something like this.” Mr. Peevey added, “It is almost inexplicable how this thing could happen if you had your eyes open and were looking out.”

Tim Smith, the California chairman of the Brotherhood of Locomotive Engineers and Trainmen, Mr. Sanchez’s union, said it supported the cellphone ban.

The development in the crash investigation came hours before the Senate approved, by a vote of 74 to 24, a rail-safety bill sponsored by California’s senators, Dianne Feinstein and Barbara Boxer. The bill, already approved in the House, would require major railroad and commuter lines to install collision avoidance systems, including automatic braking, by Dec. 31, 2015.