A school district spokesman says the loaded .38-caliber gun was in a backpack the girl was handed after a fight involving her boyfriend. He said the girl never threatened to use the gun.
Police also arrested one of the boys in the fight for having a dagger.
Parents are concerned about on-campus violence and what they say is the school's lackluster response.
"It is dangerous and it is scary for my daughter, and it's not safe for kids going to school," said an Oakland High parent.
Authorities are investigating if the fight was gang related. In addition to criminal charges, the students could also face expulsion.