Juan Alay shakes the hand of Sheriff Ross Mirkarimi during the graduation ceremony.

Photo: Lea Suzuki, The Chronicle

Juan Alay shakes the hand of Sheriff Ross Mirkarimi during the...

Image 5 of 9

Willie Eason holds his certificate of completion as he poses for pictures with family members.

Photo: Lea Suzuki, The Chronicle

Willie Eason holds his certificate of completion as he poses for...

Image 6 of 9

An inmate is patted down before entering the Five Keys Charter School at San Francisco County Jail No. 5 in San Bruno.

Photo: Lea Suzuki / The Chronicle

An inmate is patted down before entering the Five Keys Charter...

Image 7 of 9

Juan Alay (center) gets assistance from CheRonn Piper (left), site coordinator, County Jail 5, and Terese Bravo (right), assistant director of education, as he dons his graduation gown and cap outside a holding cell at the San Francisco County Jail #3 to prepare for the San Francisco Sheriff Department's Five Keys Charter School graduation ceremony in the Hall of Justice 6th floor auditorium on Tuesday, January 29, 2013 in San Francisco, Calif.

Photo: Lea Suzuki, The Chronicle

Juan Alay (center) gets assistance from CheRonn Piper (left), site...

Image 8 of 9

Friends and family cheer for a graduate as his name is called during the San Francisco Sheriff Department's Five Keys Charter School graduation ceremony in the Hall of Justice 6th floor auditorium on Tuesday, January 29, 2013 in San Francisco, Calif.

Photo: Lea Suzuki, The Chronicle

Friends and family cheer for a graduate as his name is called...

Image 9 of 9

CheRonn Piper (l to r), site coordinator, County Jail 5, Elyse Graham, deputy executive director and Terese Bravo (right), assistant director of education carry graduation caps and gowns into San Francisco County Jail #3 for inmates attending the San Francisco Sheriff Department's Five Keys Charter School graduation ceremony in the Hall of Justice 6th floor auditorium on Tuesday, January 29, 2013 in San Francisco, Calif.

The San Francisco County Jail's class of 2013 included 20 graduates who earned their diplomas behind bars, doing algebra and history homework in their cells.

While there is no prom, no parent-teacher conferences or Friday night football games, they attended a real high school, albeit one located inside a jailhouse.

Ten years ago, the San Francisco Sheriff's Office opened Five Keys Charter School, the first public high school to open in a jail, something that required a state waiver to allow for the enrollment of adults.

But aside from the lock-and-key location and the over-18 student body, the school on paper is like any other in the state. The teachers take attendance, cover state academic standards and give out grades.

Low reading levels

Most of the 250 in-custody students enter class for the first time with a fourth- or fifth-grade reading level and few future prospects for employment.

"Somebody in jail is going to get out of jail," said the school's executive director, Steve Good. "I personally would prefer they spend their time in jail ... in a productive way."

The charter school operates in the County Jail in San Bruno, with several satellite locations in San Francisco and Los Angeles for released inmates who want to keep attending classes. The Five Keys organization also includes an adult charter school and an independent study program.

Another 25 out-of-custody students graduated at a separate ceremony Tuesday.

Since 2003, Five Keys has handed out more than 600 high school diplomas, certificates of completion or equivalency diplomas.

School officials have tracked their graduates, finding that the recidivism rate for Five Keys graduates one year out is 44 percent compared with 68 percent of other inmates.

Those 24 percentage points save San Francisco about $1.5 million each year - after deducting the costs of the school.

There are now a handful of similar programs across the country modeling the San Francisco school, Good said.

The school's philosophy is founded on the five keys to an inmate's success: connection to community; a focus on family; recovery from substance abuse; education; and employment.

Inmates often balk about getting sent to "Bruno," which doesn't allow them to while away time playing dominoes.

They are expected to participate in school and other programs and often change their minds about the place, said sheriff's Capt. Kevin Paulson.

Many have changed

Stories of personal transformation are not rare.

"This is the jail where you believe in people's ability to change," Paulson said.

When Juan Alay, 29, was sent to the jail three years ago, he had never attended middle or high school and his "English was kind of like broken."

Jail officials selected him to lead the Pledge of Allegiance at his high school graduation Tuesday, his voice cracking with emotion when he got to the "with liberty and justice for all" part.

Still, running the school, which operates in both the female and male blocks, requires keen logistics. There are members from 22 gangs inside the jail and rivals are separated in and out of class.

And the curriculum is tailored to meet the needs and interests of the students. Biology of Addiction and History of Oppression are among the high school courses offered.

Students are required to complete 150 units in addition to all required coursework and pass the High School Exit Exam, as required by state law.

Students can earn up to two units per week.

At age 49, Frederick Releford put on the tasseled cap and the black gown so that only bits of orange showed at the collar and feet.

He was 23 months into a four-year sentence.

"I put myself in here," he said a day earlier, stepping out of algebra class to talk. "I'm just trying a day at a time to be productive.

"Something good, not bad, is coming out of this."

On Tuesday, his mother, Remi Releford, leaned on a cane as she watched her son graduate from high school.

"He never did graduate before," she said. "But he sure did this time."