Surveillance video captured the tragic moment two LIRR trains traveling in opposite directions slammed into a Jeep on the tracks in Long Island, killing three people inside the vehicle.

The black-and-white footage, obtained by NBC New York from a taxi provider near the scene of the crash, showed the fiery Tuesday night collision in Westbury.

In the video, a Hicksville-bound LIRR train traveling east can be seen leaving the Westbury Station before a fireball erupts as the train plows into the vehicle that was on the tracks at a grade-level crossing.

Seconds later, a westbound train headed toward Penn Station can be seen in the footage plowing into the station platform after it also struck the vehicle and derailed.

All three men in the burgundy Jeep, identified as co-workers who were employed at a nearby supermarket, were killed in the crash.

“[We heard] a lot of people screaming, and we saw a lot of people running on the platform on the other side. They were banging on the windows,” witness Yuri Cruz, a worker at Taxi Universal, told NBC New York.

A manager at the Fine Fare Supermarket on Old Country Road in Westbury identified the victims as Jesus Hernandez, Miguel Luna and Saul Martinez.

Nassau Police Commissioner Patrick Ryder said Wednesday that the vehicle involved in the crash had gotten into a minor accident with another car just before and went around the security gate at the crossing.

“The vehicle that was hit, the only thing we have left is the engine itself,” Ryder said.