A Bowie teenager was killed after she was hit by a train late Wednesday night while walking on the tracks in the Riverdale area, authorities said.

Mary C. Gaffney, 17, was wearing headphones as she walked on the train tracks in the 6100 block of Lafayette Avenue just before midnight, apparently oblivious to an oncoming CSX freight train, said Cpl. Clinton Copeland, a Prince George’s County police spokesman. The train hit Gaffney, Copeland said, and she was pronounced dead at a hospital early Thursday morning.

Copeland said he did not know where Gaffney was coming from or headed to, and it remains unclear why she was on the tracks. He said investigators believe the crash to be accidental, and that Gaffney was not trying to harm herself intentionally.