Amtrak plans to install a fence along tracks in Middle River, Md., where a 14-year-old girl was struck and killed by a train last year.

Police said Ann Marie Stickle of Middle River was listening to music while wearing headphones and did not hear the train approach.

Amtrak said the 8-foot fence, which will stretch more than a mile, will deter access to the tracks and will join with fencing that’s already in place to create a two-mile barrier.

The project, about 11 miles north of Baltimore, is costing $3.1 million, Amtrak said. The tracks in the area accommodate Acela, Northeast Regional and freight train service.

“The new fence will make it harder for a person to access the tracks, but to achieve maximum safety individuals must make the right decision to stay off the tracks and not use it as a shortcut,” said Amtrak Chief of Police John O’Connor.