Staff members found it while sweeping the school for contraband, as they do monthly, the school's founder, Walter Palmer, said yesterday.
School is out for the summer, and no students were in the building. Police confiscated the gun, which had 19 rounds in it, O'Brien said Wednesday morning.
"This is the largest find we've ever had in 12, 14 years. We expect to find cellphones in the lockers; we don't expect to find knives or guns," Palmer said.
He added: "I tell people we have more at-risk children than other schools - we go after at-risk students - so our school is not immune [to such troubles]. But I also tell people: Don't be so fast to judge. People want to say: 'Oh, my God, these badass kids!' But suppose an adult did it? Or someone from outside the building hid it until they could come back for it. We don't know yet how it got there. All I can believe is that somebody thought they could store it there."
The discovery was especially upsetting and ironic for Palmer, considering that one of the main missions of his school is social justice.
"The first week of school [every year], our students march through the community against guns, drugs and violence," Palmer said.
Police and school officials haven't determined how long the gun was there or how it got into the school. When school is in session, students must pass security personnel using metal-detecting wands to ferret out forbidden items, Palmer said.
The school, which opened in 2000, has sparked controversy in recent years: District officials say it has had poor academic performance for more than six years, violated charter-school rules, failed to meet minimum financial standards and audit requirements, and fraudulently billed the district for students not enrolled there.
The School Reform Commission voted in April to suspend Palmer's charter and begin the revocation process.
A month later, district officials said they'd drop the suspension but continue the revocation process to avoid potential legal delays. That means the school can keep operating until the revocation process is complete, which could take more than a year.
School officials have been negotiating with the district on what improvements they can make to ensure they can stay open, Palmer said.
The school, which enrolls about 1,300 students, has two locations: the Frankford location, where the gun was found, for grades five through 12, and a K-4 campus in Northern Liberties.
Most students come from poor neighborhoods and single-parent families, most are black or Latino, and most are classified as special education for various learning or other disabilities, Palmer said. "These are the kind of children most places run from," he said.
On Twitter: @DanaDiFilippo