Crew members escape fiery train after it derails in Kentucky

The workers were initially trapped inside the locomotive, according to reports.

Two CSX crew members have escaped after the train they were working on derailed and caught fire in Kentucky.

The train, which consisted of 96 loaded ethanol cars and two loaded rock cars, derailed while traveling southbound in a rural area in Draffin, Kentucky, just after 7 a.m. Thursday, according to a statement from CSX.

One of the locomotives was on fire as well as an "unknown number of cars," the statement read.

The two workers were initially trapped inside the locomotive, and a flammable liquid was leaking into the Big Sandy River, emergency officials said, The Associated Press reported.

The workers were able to exit the derailed train and make it safely to shore, according to CSX.

Videos posted to social media show the workers being rescued as flames surround a car that had gone into the river.

Emergency crews have responded to the scene, according to CSX. The NTSB will investigate the incident.

ABC News' Rachel Katz and Amanda Maile contributed to this report.