Fresno Police said two groups of teens got into a fight near the school shortly before three. Officers said one person fired the gun in the air to scare off the members in the other group.
No one was injured and Tioga Middle School was put on lockdown for a short time.
The juveniles, between the ages of twelve and sixteen, face several charges. Officers recovered the weapon.