Fires raged, chemicals leaked, smoke climbed to the sky and the possibility of an explosion was a constant worry.
And amid it all, in the middle of a century-old tunnel where temperatures were approaching 1,500 degrees, an investigation had to begin.
It started with a call to the National Transportation Safety Board in Washington about 5 p.m. July 18. Officials there must quickly try to assess the seriousness of an accident and whether it's likely to become a high-profile event. When they heard a 60-car freight train loaded with hazardous chemicals derailed beneath Baltimore, NTSB officials knew they'd be counted on to determine how it happened.
To do that, agency investigators hit the road immediately, moving to examine the tracks and signals. They also needed to check the site for clues, equipment for defects and paperwork for problems.
In short, they began a task certain to be long and arduous.
"We begin our work as soon as we receive the call, right away," said Keith Holloway, a spokesman for the NTSB. "The investigations can take a long time, but it's extremely important that we get there as soon as we can."
The agency's primary goal since its inception in 1967 has been to investigate accidents in an effort to reduce their number.
But in addition to making suggestions to improve safety, the agency's conclusions often have enormous financial repercussions. Its determination of what caused the derailment and fire that shut down half of Baltimore's main business district could help determine who is responsible for paying millions of dollars in damage.
When the first investigator arrived outside the tunnel, just hours after the derailment, it was apparent one of the team's goals would be tough to achieve.
"First thing they want to do is secure the area," said Wyman Jones, a rail safety expert at the federal Transportation Safety Institute.
"Police and fire have already contaminated it, but they want to contain the evidence as best they can."
As it turned out, the investigators couldn't get inside until Sunday, July 22, nearly four days after the wreck. Which is not to say they had nothing to do until then.
As charred and smoldering freight cars were being pulled from the tunnel, the investigators examined them from top to bottom, paying especially close attention to the steel wheels.
"They're trying to determine what was the first wheel to derail, then where it derailed," said Jones, who has instructed NTSB workers on train investigations. "That is very, very important, and you usually find that in the wheels and tracks."
The wheels and tracks are inspected for deep scrapes and gouges, signs of trouble. Those that have unusual markings are taken to an NTSB laboratory for testing where scientists can tell whether a piece of rail or wheel has been weakened to the point at which it could cause an accident.
In most cases they can determine with confidence whether a piece of equipment was damaged by an accident or before it.
The NTSB has enjoyed a solid reputation, in no small part because the pictures of its work are nothing short of amazing. Americans have become accustomed to seeing news video and newspaper pictures of airplanes, exploded or crashed into literally thousands of pieces, reconstructed in airline hangars as investigators try to determine what went wrong.
In railroad accidents, such extensive reconstructions are not necessary, though investigators sometimes will try to re-create the path of a freight car's "truck" - the wheel assembly - on a stretch of railroad track.
By doing so, Jones said, they can match patterns of damage on wheels and track.
Robyn Cicero, a safety expert with iJET Travel in Annapolis, a consulting firm, said the structural damage will be only one part of the investigation.
"They look at virtually everything, especially in a case like this," she said. "In something this catastrophic it never seems to be one particular cause. It's usually a series of things that went wrong."
Reviewing the data
Trains carry less sophisticated versions of the "black box" that is the focus of so many aviation accidents. Investigators will scrutinize the data from that, determining the train's speed and, with the help of mathematical equations, they can determine the portion of track where something went wrong.
Most locomotives now have a high-tech feature called touch panels. If the engineer fails to touch a piece of driving equipment in a given period of time - often 30 seconds to one minute - an alarm sounds. If he doesn't respond, the train brakes automatically.
"The industry as a whole is a lot more advanced as far as technology goes than people realize," said Aaron G. Gellman, a former director of the Transportation Center at Northwestern University. "In some areas it's extremely sophisticated."
The communication systems between train crews and dispatchers are a good example. When the CSX train derailed, the crew first called company dispatchers at a headquarters in Jacksonville, Fla.
There, about 50 dispatchers typically sit in a circular, tiered room, their backs facing the middle, touch-screen computers in front of them and projection screens on the walls above them.
The dispatchers control the movement of all trains on CSX track with the exception of a few short stretches. They also handle emergencies such as the one the crew in Baltimore reported.
Conversations are recorded, and investigators will be requesting those tapes. Under the Railroad Safety Act, CSX is required to turn them over.
John Hammerschmidt, one of four NTSB board members, said investigators working the tunnel fire are divided into teams composed of the agency's employees, and those from the city, CSX, two of its unions and the Federal Railroad Administration.
Each team, made up of four to six people, will investigate one aspect of the circumstances surrounding the accident.
One team will study the plans of the agencies that responded to the derailment and another will look at issues surrounding the chemicals aboard. They'll want to know whether hazardous chemicals were in cars too close to the locomotives. They'll also be looking at the weight of cars, seeing if guidelines were followed that say heavier cars should be closest to the locomotives and lighter cars farther away.
But early indications are that the most intense focus in the investigation will be on the tracks and if they were weakened.
"Obviously enough, you have a derailment and you want to really find out the shape of the tracks involved," said Robert Gallomore, a railroad safety expert taking over the transportation program at Northwestern. "They'll want to know everything there is to know about those tracks."
The NTSB has said it doesn't expect to have a final report on the accident for about nine months.
That is largely because investigators will have to wade through thousands of pages of documents from the railroad, regulators, the city and a slew of private companies that responded to the crash.
The tunnel's tracks were visually inspected the day before the accident, CSX officials have said, and records showing the results have been requested.
In addition, the tracks underwent more sophisticated testing using specially designed cars. It is unclear when those tests were last performed. The tests measure the height and width of the rails. Another test uses ultrasound to determine whether the tracks are weakening and if there are cracks inside.
Investigations into train wrecks are also slowed because so many parties are often involved.
Trains operated by CSX often include freight cars owned by other companies - CSX is merely hauling them.
Disputes over cause
In the Baltimore case, investigators are also gathering records from the city, including those revolving around a water main that burst near the accident site.
The pipe produced an early skirmish between city officials and CSX - brief but intense.
City officials maintain the pipe burst only after the derailment. CSX officials have suggested that a broken water pipe might have contributed to the derailment.
Both sides have said they have agreed not to talk about responsibility for the accident until the NTSB finishes its investigation.
The agency has become a fixture at the nation's - and sometimes the world's - worst transportation disasters.
It takes responsibility for investigating serious accidents involving aviation, highways, waterways, pipelines and railroads. The agency has examined more than 110,000 accidents.
"Each accident is different, but we follow primarily the same routine," said Holloway, the NTSB spokesman.
The NTSB has no regulatory power and its findings cannot be presented in court as part of a civil lawsuit. But the report provides valuable information and draws conclusions helpful to lawyers - and helpful in getting lawsuits settled out of court.
"It's the credibility the NTSB has," Jones said. "They have very difficult work ahead of them and it'll take some time, but there is no doubt they will get where they want to go."
When the teams finish their work, they will each write separate findings and submit them to Jay L. Kivowitz, the investigator in charge.
Using that information, Kivowitz will then write a report with help from experts in various fields, drawing conclusions on "probable cause" and "contributing factors" and making suggestions to avoid such problems in the future.
Once that report is completed, it is sent to office directors and then to the board, currently consisting of four members, but usually five. The board then votes whether to accept the findings - and almost always does. If not, it is sent back to investigators.
"It's a long process," Holloway said. "But it works."
Sun staff writers Marcia Myers and Steve Kiehl contributed to this article.Copyright © 2015, The Baltimore Sun