MINNEAPOLIS (AP) — BNSF Railway says it's spent more than $2 billion over the last decade developing and deploying a new safety technology that will be required by federal regulators by the end of the year.

The new technology, known as positive train control, is designed to automatically slow or stop a train to prevent accidents such as a collision with another train or a derailment caused by excessive speed.

The system gives the operator a warning using a complex network of GPS technology and other monitors. If the engineer doesn't take action, a computer can take control.

BNSF Railway spokeswoman Amy McBeth says the railroad company is one of the first to fully implement the technology across all locomotives and mandated routes.