A Corrections officer was shot at in a carpark at Whanganui Prison this week.
Police were called to report of shots fired near the prison at 9.20pm on Wednesday.
No one was injured and inquiries are ongoing.
Corrections Association president Alan Whitley said the shooting may have followed a traffic incident in town.
It was believed a vehicle had followed the man to the prison carpark before shots were fired, he said.
He could not comment further.
"We don't want to prejudice any court matters. Whoever has done this, we want to make sure they are held to account because they should be."
Public Service Association national organiser Willie Cochrane said a police investigation was ongoing, and at this stage he was not aware of any arrests.
It was not believed the officer had been targeted because of his job, he said.
"We have taken great care of the officer involved, he and his wife and children are being looked after."
A Corrections spokesperson also said they were "providing a staff member with ongoing support".