ELLICOTT CITY, Md. — They were seemingly ordinary tweets from two friends hanging out on a railroad bridge in their hometown, enjoying one last summer night together before heading back to college.

“Drinking on top of the Ellicott City sign,” read one. “Looking down on old ec,” read another. Accompanying photos showed their view from the bridge and their bare feet, one with painted blue toenails, dangling over the edge. “Levitating,” read another tweet.

Minutes after the messages were sent, a CSX freight train loaded with coal barreled down the tracks and derailed, killing the 19-year-old women and toppling railcars and coal on the streets below.

Investigators were still trying to figure out what caused the derailment. Witnesses heard squealing brakes and a thunderous crash around midnight Monday.

It wasn’t clear whether the women’s presence on the tracks had anything to do with the derailment. They were sitting on the edge of the bridge as the train passed a few feet behind them, Howard County police said, and their bodies were found buried under coal. Authorities said they needed to do autopsies before their cause of death could be determined.

Killed were Elizabeth Conway Nass, a student at James Madison University in Virginia and Rose Louese Mayr, a nursing student at the University of Delaware.

The railroad is easily accessible from the picturesque downtown of Ellicott City, and generations of young people have played and partied along the tracks. The railroad was completed in 1830 and crosses over Main Street in the city’s historic district, following the route of the nation’s first commercial railroad, according to the Baltimore & Ohio Railroad Museum.