Up to 600 litres of diesel has spilt in Lyttelton, Christchurch, after a truck collided with an overhead pipe.
Fire and Emergency NZ were called to the diesel spill on Godley Quay, near the Lyttelton port, just after 2pm.
A spokeswoman said crews from Woolston and Lyttelton had set up a cordon, and a sand truck was in attendance putting sand on the spill.
The road is now open with traffic management in place.
A spokesman for the Lyttelton Port Company said the spill was on a public road and not on the port.
A Z Energy spokeswoman confirmed a rupture to the pipeline was associated with their terminals, storage and handling facility in Lyttelton.
"In the early afternoon of today, a large boat being towed on a trailer collided with the bridge, with the consequence that the boat has torn the bracing out of the pipe and compromised the integrity of the pipe.
"This has resulted in diesel temporarily spilling on to the road," she said.
"The Lyttelton Port Authority and the local emergency services are working with our team and have successfully contained the spill - there is no more leaking.
"The majority of the spill has been contained in suitable vessels under the leak site and our normal spill emergency response kit – which includes absorbent material – has been deployed effectively."
Council and WorkSafe have been notified and Council will attend to traffic management requirements.
The spokeswoman said it will continue to contribute to every effort to minimise the impact of the spill.
"The Harbour Master has assessed the situation and we're confident that there is extremely limited potential for diesel to contaminate water or drains as there is no local access to storm drains," she said.