A fuel tanker drives between barrier arms at a rail crossing in Ngāruawāhia moments before a train passes.

A fuel tanker driver's decision to cross a railway line with barrier arms down seconds before a freight train barrelled through could have ended in mass fatalities, authorities say.

And the driver that made the near-miss manoeuvre was sacked for it.

Footage of the Linfox fuel tanker weaving through downed barrier arms of a Ngāruawāhia railway crossing in August was posted on the Fuel Tankers Facebook page.

Facebook A fuel tanker drives between barrier arms at a rail crossing in Ngāruawāhia moments before a train passes.

It shows the driver pass over the Ellery Street intersection around the lowered barrier arms 10 seconds before a freight train comes roaring down the main trunk line.

READ MORE:

* Waikato youths playing a deadly game of rail roulette

* Friends witness girl, 11, struck and thrown by train at Ngāruawhāhia

The crossing is within 30m metres of an LPG tank on the grounds of a BP petrol station.

Google Maps The Ellery St Railway crossing in Ngāruawhāia.

"To see a flammable petrol tanker go in front of a train travelling at max speed is pretty horrifying," rail safety charitable trust Tracksafe spokeswoman Megan Drayton said. "It's probably the most unsafe thing I've seen.

"It is highly dangerous behaviour to drive around a lowered barrier arm - you're not only putting yourself at risk, but putting the train driver and other road users at risk.

"This was potentially catastrophic - you could have been looking at mass fatalities."​

Linfox was alerted to the incident on August 19 - the day it happened - and the company launched an immediate investigation, Linfox health and safety administrator Casey Tahau said.

The driver was no longer working for the company.

"We have gone through and done an investigation regarding this and contacted NZ police and spoken with our driver."

Disciplinary action was taken and subsequently the driver was "no longer with the business".

She said it was shocking to witness such behaviour.

"Our safety strategy is vision zero - which is basically no fatalities, no incidents, no injuries and everybody gets to go home safe every day.

Ngāruawāhia Fire Chief Karl Lapwood was shocked, too, by the video he'd seen circulating on the Ngāruawāhia community social media pages.

Had the tanker and train collided, the fallout would have been catastrophic, he said.

"It was one of the more alarming things I've seen. If it had all gone wrong, it would have been a disaster.

"The potential risk of explosion and fire ... the location of where it was and the fallout into the river - it would have been a significant event for the town.

"And potentially a loss of life for somebody, given the size of the petrol tanker and the explosiveness of it."

Given the momentum of a train, it would likely have continued on after the collision, taking out the nearby panelbeater and "everything from the river", he said.

"If it's going north towards Huntly, everything in its path would be wiped out for the next 200 metres and probably all of the surrounding areas would be affected.

"No matter what, it would have been bad. That's one job I'm glad hasn't happened."

KiwiRail was equally worried by the driver's conduct.

"KiwiRail was notified of this incident by Linfox. We take safety very seriously and were pleased to hear that they acted quickly and proactively following the incident, including educating staff nationwide on rail safety. We are also conducting our own review of the incident.

"Barrier arms are in place to protect the safety of both motorists and our drivers. It's important to always obey warning signs, alarms and signals at level crossings, and never cross if barrier arms are down."