The branchmen advanced, one step at a time, and Mr Foster used bolt cutters to clear a way through the cage around the pipes and reach a valve to turn the gas off.
That happened at 9.21am on Thursday, two hours after a driverless Citylink bus, parked on Kamo Rd with its handbrake off, rolled 50m backwards into the Z Energy service station between Wakelin St and Wilkinson Ave and slammed into the cage around the gas pipes.
The bus driver had left his empty vehicle at the bus stop by the Kamo Four Square store while he bought a newspaper.
Miraculously, no one was hurt as the vehicle rolled down Kamo Rd, narrowly missing street signs, petrol pumps and poles supporting the Z Energy forecourt roof.
More than 30 firefighters on appliances from Whangarei, Kamo and Ruakaka brigades attended the emergency, along with 20 police, ambulance crews and Civil Defence officials.
Houses were evacuated as a 600m cordon was placed around the service station.
Mr Foster and Whangarei brigade senior station officer Ron Wilson assessed the options and decided to turn off the valve controlling the escaping gas.
Stopping the gas further downstream would have involved checking all supply points to prevent leaks when it was turned back on.
Firefighters used techniques they had learned at the Marsden Pt oil refinery, where they extinguish fierce fuel fires lit on a special pad in preparation for any refinery blaze.
If the natural gas had ignited at Kamo, Mr Foster said the breathing apparatus, helmets and clothing the firefighters wore would have protected them from harm.
Rookie fireman Rob Wilson, who was one of the branchmen, said the loud noise made by the escaping gas was alarming and the danger had crossed his mind.
"But you trust your equipment and those around you and just get on with it," he said.
Another branchman, Chris Newson, said it was the first gas leak he had encountered in two-and-half years as a firefighter and he had not thought of the danger.
"You're there to do a job. You trust the gear and you trust the process," he said.
Meanwhile, a police spokeswoman said the incident was still being investigated and the bus driver had been spoken to.
A decision on whether charges would be laid had yet to be made.