An Auckland commuter's dash to beat a rail barrier arm almost ended in disaster this morning.
Auckland Transport has criticised the woman's "dangerous and stupid" behaviour.
The incident occurred at the level crossing near Auckland's Morningside station at 8.15am this morning.
"The lights came on and she wanted to speed through," an eyewitness told the Herald.
"But the barrier hit her roof and then she could have reversed but she chose to go forward and then just stopped there"
"She could have just reversed back," the eyewitness said.
"I don't know whether she panicked or what but she went forward and then she just stopped".
He said the slow-moving train that had left Morningside Station then had to squeeze through a "narrow wee gap" as other motorists watched nervously and the car's driver stayed inside her vehicle.
"She must have been running late for work," mused the eyewitness, who said the driver went on with her journey after the train passed by, adding that he regularly travelled the route and hadn't seen any similar incidents.
"I'm sure that's left a big dent on her car as well, those barriers aren't light."
An Auckland Transport spokesperson told the Herald that the woman's actions were "dangerous and stupid".
"The barrier arms are there to protect motorists," they said in a statement.
"This not only puts the motorist and any passengers in danger but also poses an extreme risk to rail staff and train passengers.
"Don't try to race the train - wait for the alarms to stop and the barrier arms to go up - it's as simple as that."
A spokesperson for TrackSAFE, a not for profit foundation that aims to educate Kiwis about safety around railways, told the Herald that they were "extremely disappointed" to see the footage and said the driver's actions were "illegal and highly unsafe".
"We strongly urge all motorists to be alert and aware whenever driving around the rail network.
"Obey the signs and signals at level crossings, keep the cross-hatching area clear and always ensure there is space for your vehicle on the other side of the crossing before driving over the tracks," they said in a statement.
The Morningside Station has been the scene of multiple incidents involving both pedestrians and cars being struck by trains.
In January 2015, 24-year-old Auckland man Tejas Patel was killed after getting off a passenger train at the busy station.
A 2016 report from the Transport Accident Investigation Committee found that Patel passed through an unguarded opening,and stepped out in front of an approaching train.
The Commission also found that it was very likely that he was distracted by his mobile phone when he stepped out in front of the train.
In 2016, a woman who witnesses said was rushing to the airport drove her car on to the tracks in front of a train and was injured when a train hit her vehicle "dead centre".
In 2013 a wheelchair user received critical injuries after she was struck by a freight train when her wheelchair became stuck on the crossing.