Unprecedented security, including officers armed with police-issue Bushmaster rifles at each entrance, was in place at the Dunedin courthouse in lower Stuart St as the men, three from Black Power and one from the Mongrel Mob, were due to appear.
Three of the men were arrested following a confrontation between the rival gangs in Allenby Ave, Liberton, on Sunday afternoon, during which a man was shot in the arm.
While two more men were arrested yesterday, including the victim of the shooting, others arrested on Sunday have since been released without charge.
Much police work was still going on around the case, he said.
As the gang members appeared in court, patched members of the Mongrel Mob milled around in Stuart St outside the courthouse, denied entry by the armed officers.
About a dozen other police were also stationed inside and outside the building.
The four men before the courts were remanded in custody - two by consent - and will reappear tomorrow, three to answer an indictably-laid (more serious) charge of unlawful assembly and the other a less serious charge of disorderly behaviour likely to incite violence.
Black Power president Albert Epere (43), who was shot in the arm during the confrontation on Sunday afternoon, was arrested yesterday on his release from hospital.
He did not appear in court, but was given a registrar's adjournment to tomorrow on a charge of unlawful assembly, and remanded in custody by consent until then.
He is jointly charged with three others, including Black Power member labourer Daniel Moana Ryan (45) and a man who was remanded in custody by consent to Thursday and granted interim name suppression.
Tyrone Kamal Henare (19) was also declined bail on a charge of disorderly behaviour likely to cause violence.
Judge O'Driscoll noted Henare was recently released from prison after serving a four-year, three-month sentence imposed after he shot at police officers, and that with a history of offending on bail, was a high risk of reoffending if released on bail.
Det Sgt Henderson said another man would appear in the Dunedin District Court today. The public could expect to see extra police security around the courthouse again tomorrow when members of both gangs were scheduled to reappear.