Police in Wairoa say they're incredibly grateful to those members of the public who helped an officer who was being attacked in the town on Boxing Day.
Four officers in different parts of the country have been attacked over the past three weeks - three of them on Boxing Day.
The Wairoa incident was made public only on Wednesday.
Senior Sergeant Tony Bates says the officer had pulled over a stolen van and was arresting the driver and a passenger when they attacked him, punching and kicking him in the head, neck and ribs.
Mr Bates says the passenger had a knife, so the officer used a pepper spray; nearby residents came running out and the passenger ran away.
Mr Bates says the officer, who is now recuperating at home, would have been more seriously injured if the residents, including two off-duty police officers, hadn't come to his aid.
He says the residents restrained the driver and then helped police track down the other man, who had fled.
Two men aged 25 and 26 were due to appear in court on a number of charges on Wednesday.
Three other attacks in December
Two other officers were assaulted on Boxing Day.
The first incident was at Matauri Bay in Northland early in the morning. Two young men are charged with assault.
The other incident, which occurred at 5pm in Hamilton, involved a machete and a knife. Charges of attempted murder have been laid against two teenagers.
On 11 December Constable Bruce Mellor, 57, sustained serious skull and facial wounds in a machete attack when he stopped a stolen car near Taihape. Two teenagers are charged with attempting to murder him.