San Francisco city and school officials are looking to open a first-of-its-kind homeless shelter at a public school to provide emergency housing for students and their families.

The idea for Buena Vista Horace Mann, a K-8 school in the Mission District, is virtually unprecedented and has raised parent concerns about safety, the reliance on already overwhelmed facilities and the stigma students could face for having to live in the school gym.

But with an estimated 2,000 students who are homeless or living in insecure housing in San Francisco, some city and school district officials believe public schools can be part of the solution. If the project works, it could be adopted at other schools in San Francisco.

The proposal, spearheaded by Supervisor Hillary Ronen, involves converting the smaller of Buena Vista Horace Mann’s two gyms to a family shelter from 7 p.m. to 7 a.m. every day, including weekends, summers and holidays. The city would pay up to $900,000 per year to serve up to 20 families at a time with all-night staffing, food and support services to help the families find permanent housing.

“It’s interesting in terms of out-of-the-box, innovative thinking for a problem that a school district wouldn't typically help to solve,” said school board President Hydra Mendoza. “There’s something to be said for kids being in a familiar space, and I think that’s what was compelling for me.”

More than 60 families at the school are not in a stable housing situation and many are homeless, city officials say. The students are not able to sleep; they are traumatized; and that means they are too stressed to learn, said Buena Vista Horace Mann Principal Richard Zapien.

Tutoring, counseling and case workers aren’t enough to overcome homelessness, he said.

“We know there’s a need we’re not able to address,” Zapien said. “We’re not just going to sit back and say we can’t help.”

He and his assistant principal, Claudia DeLarios Morán, approached Ronen and pitched the idea of a school emergency homeless shelter, saying families and children were asking if they could sleep at the school.

It’s not ideal, said Ronen, adding that ideally everyone would have stable housing, but that’s not the case.

“It really felt like it made a lot of sense — that it was a solution for everyone,” Ronen said. “The fact that kids are asking to sleep at the school says a lot to me.”

Ronen, Mendoza and the school’s administrators broached the idea at a scheduled parent meeting Monday night.

The topic, however, hadn’t been on the agenda, and some parents said they were blindsided by the idea.

“They ... just ran with it without finding out what the community thinks first,” said parent Marisa Zuzga. “I have serious concerns.”

Several parents said that while they want to support homeless families, they are worried about putting a shelter in a school facility that is in need of upgrade and repair.

They said outdoor lights don’t work and bathrooms need new stalls as well as working soap dispensers. On Tuesday, water pooled on the ground below a leaking water fountain adjacent to the school’s small gym.

The school needs a lot of attention, and it’s unclear what impact a homeless shelter would have on an already overwhelmed school site, said parent Johanna Lopez Miyaki.

Miyaki wondered whether there would be a security guard, whether families from other schools would be eligible to stay there and whether there would be a limit on how long families can stay. And if the shelter closes at 7 a.m., Miyaki said, would there be enough time and staff to clean the gym before kindergartners start rolling around on the floor during gym class?

There are a lot of unanswered questions about the proposal, even though it is based on the best intentions of helping homeless families, Miyaki said.

“I don’t think any of the parents are opposed to finding a solution to this heartbreaking and really critical situation,” Miyaki said. “But I think it’s ambitious, to say the least, that you’re going to roll this out in October.”

The idea would need a budget sign-off by the mayor to fund the shelter, as well as support from the school board, with an agreement that would give the city the responsibility for operating and maintaining the shelter.

“We’re in the middle of a humanitarian crisis, and we’re happy to consider any and all ideas people bring forward, and we’ll give this full consideration,” said Jeff Kositsky, director of the city’s Department of Homelessness and Supportive Housing. “The fact that it hasn’t been done before doesn’t mean we shouldn’t try it.”

The process of opening a shelter at Buena Vista Horace Mann would include a public vetting of the idea before a decision is made, Mendoza said.

“There’s still a lot of work we’d have to do, and a lot of questions that need to be answered,” she said. “We want this to be a community decision.”

Parent Erika McDonald, one of the school’s PTA presidents, said she already supports the idea.

“It’s devastating that we have to deal with families that are homeless,” she said. “I’m really glad that people have brought this to us. We’re just working as hard as we can to make sure our families are taken care of.”

Only a few examples appear to exist of schools doubling as emergency shelters at night, including a private Quaker school in New York. But public schools are designated as emergency shelters in the event of earthquakes, tsunamis or other catastrophes.

In other words, they are “places of refuge” in crisis situations, Morán said, and the homelessness crisis “fits the bill.”

And for the school’s most desperate families, a cot on a gym floor would bring much-needed sanctuary and stability, she said.

On Tuesday, one mother, who has a third-grader at the school, cried as she described her current living situation, which includes sharing a room with her three children in a place where she faces frequent threats of eviction and harassment if her children, including a toddler, make any noise.

The woman, who didn’t want to be identified, said she and her children don’t sleep well and her third-grade child is struggling in school because of the stressful situation. She is on waiting lists for more stable housing.

“I feel very safe when I’m at the school,” she said. “I want to sleep in the gym.”

Jill Tucker is a San Francisco Chronicle staff writer. Email: jtucker@sfchronicle.com Twitter: @jilltucker