Police in Christchurch are trying to identify members of a large gang who ambushed a lone police sergeant.
He was responding to calls about boy racers when he was confronted by about 300 youths in Wigram on Friday night.
Police say it was an organised ambush, in which beer bottles were thrown and an air rifle was fired, striking the car window beside his head.
Cries of 'kill him' and 'box him in' were heard.
The sergeant was forced to flee to safety.
Area Commander Malcolm Johnston says it's a serious escalation in behaviour and it will not be tolerated.
The home of Mayor Bob Parker was targetted last weekend.
Mr Parker says a group of boy racers gathered outside his apartment building in the central city on Saturday night, revving their engines and yelling abusively.
The mayor has taken a tough stance on boy racers, imposing "no stopping" restrictions and vehicle bans on various streets in a bid to move them out of the city.
Mr Parker says it was not the first time he and his wife have been the target of intimidation.
Dark city depicted
Last month, a German TV documentary depicted Christchurch as a city that is overrun by boyracers after dark.
The city centre was described as a no-go area at night.
Police were reported to be struggling to tackle the problem.