Groups of young people had been throwing fireworks at police officers, members of the public and vehicles