Police officers had rocks and bottles thrown at them after a group of about 40 youths gathered in Tikipunga, Northland, to fight.
Whangarei police Sergeant Paul Nicholas said officers were alerted to the group of young people on Denby Cres outside the Denby Golf Club about 3.30pm on Sunday.
Mr Nicholas said it appeared the group was getting ready to have a fight. When police arrived the group started throwing rocks and bottles at police.
About six police officers called to the street got the crowd under control and arrested two people. Two men, aged 17 and 19 years, were taken to the station and given written warnings for disorderly behaviour.
Whangarei police spokeswoman Sarah Kennett said when officers turned up to disperse the crowd some of them took exception and threw rocks and bottle.
No officers were struck by the missiles.
"It was only a couple of young people that decided to throw bottles and rocks. The police were not pelted by the group," Mrs Kennett said.
"It wasn't a major disorder situation at the end of the day."
She believed that the group had gathered as a result of text messages, twitter and Facebook but could not confirm if that was actually how the crowd had gathered.