(CNN) -- Two teenage girls were killed early Tuesday when a train derailed on the bridge they were sitting on, spilling coal and burying the young women, police in Maryland said.
Rose Mayr and Elizabeth Nass, both 19, were apparently sitting on a bridge ledge in Ellicott City, Maryland, just after midnight with their backs to the train when it derailed, according to a written statement from Howard County police.
The two girls posted photos to Twitter shortly before the crash. One showed feet dangling over a road, with the caption "Levitating." Another appeared to look down Main Street.
Nass tweeted, "Drinking on top of the Ellicott City sign with @ r0se_petals." The name Ellicott City is painted on the railroad bridge.
"We went to the site ... hung around, but the police wouldn't let us in," he said.
Nass was supposed to go back to college at James Madison in Virginia on Tuesday, he said. Classes begin in six days, according the university's website. A spokesman said Nass was an honors student in the interdisciplinary liberal studies program.
Mayr was a nursing student at the University of Delaware who was about to start her junior year.
"They were both terrific kids," Mount Hebron High School Principal Scott Ruehl said. "Both girls were really involved in the dance program. They were pleasant; they always said hi in the hallway."
Butko said Mayr was a very funny girl.
"She always had a smile and a joke," he said. "She was goofy at times but could be there for you when you needed it."
Jim Southworth of the National Transportation Safety Board said the investigation into what caused the accident was just beginning. He said the train -- with two locomotives and 80 cars -- was going 25 mph when it jumped the tracks. The first 21 cars behind the locomotives derailed, he said.
None of the three crew members was injured, he said.
Marmie Edwards, spokeswoman for Operation Lifesaver, a nonprofit organization that promotes railroad safety measures, said the number of fatalities in 2012 involving people on tracks was up significantly.
"It's probably just as well to stay away, not just to be off the tracks, but stay away from the train so you know you're going to be safe," she added. "Because it's hard to say, 'OK, here it's safe; there it's not.' So just stay away."
According to the Federal Railroad Administration, through the first five months of the year, 178 people have been killed in accidents on or near tracks (not including at a railroad crossing).
CNN's Brian Todd and Dugald McConnell contributed to this report.