School districts in the most expensive regions of California, struggling to pay salaries that keep pace with the high cost of living, are increasingly turning to housing incentives to attract new teachers and stanch the flow of teachers from leaving their schools.

Affordable housing projects for school employees have been built in Los Angeles, Santa Clara and San Mateo over the last 20 years. Now, with housing costs continuing to rise and new state laws that make building employee housing easier, a wave of new projects is in the pipeline.

Santa Clara County, San Jose Unified, Jefferson Union High School District, the Sonoma County Office of Education, San Francisco Unified, San Lorenzo Valley Unified, West Contra Costa Unified and Mountain View Whisman School District are among those that have approved employee housing or are considering it. All of those districts are in the Bay Area, where the rent for a modest one-bedroom apartment in the region stretching from Marin to Santa Clara County is more than double the median one-bedroom rent statewide, according to an EdSource analysis.

The analysis found the Bay Area has the largest disparity between teacher salaries and rental housing costs in the state. In 47 school districts in the region, the highest-paid teachers only earn enough to rent an affordable one-bedroom apartment, using the federal definition of affordable housing as 30 percent or less of household income.

The movement to provide affordable housing for teachers and other school employees is spreading throughout the Bay Area and into other regions of the state where the housing supply is limited or too expensive for teachers.

“This is a statewide problem,” said Dale Scott of Dale Scott & Company, a financial advisory firm that has worked with school districts to fund affordable housing. “The problem of affordability is obvious in the Bay Area and other parts of the coastal area. In the Central Valley, it is often supply. There simply aren’t enough rental units for teachers and staff.”

Dale Scott & Company advised Jefferson Union High School District officials in Daly City when they put a $33 million general obligation bond on the ballot last June to help build affordable apartments for teachers and staff. Scott said he doesn’t know of another school district that has passed a general obligation bond purely to finance an employee housing project.

The Serramonte del Rey Faculty and Staff Housing Project, built on the site of a former school, is expected to cost $50 million to $60 million, according to the district. It will break ground on the 116-unit project this summer.

Officials from more than 20 school districts in rural and urban areas have contacted Dale Scott & Company with an interest in funding staff housing through a general obligation bond, Scott said. “I think there will be a fair number on the 2020 ballot,” he said.

San Jose Unified School District officials have identified nine potential schools that could be converted to affordable housing for staff, said district spokeswoman Lili Smith.

The idea has drawn opposition from residents of the Almaden Valley neighborhood. A petition on change.org to Save Leland and Bret Harte — two of the schools on the district list — has nearly 7,000 signatures. Greg Braley, who started the petition, has said the projects will hurt the neighborhood’s property values and require students to travel farther to school.

Smith said the district loses 1 of every 7 teachers each year. Teachers who stay in the district often commute long distances to homes in less expensive areas.

“We are living in one of the most expensive areas in the U.S. It’s not just for the teachers, it’s for the staff as well,” Smith said. “We are looking for ways to help our staff live in the place they work.”

The Santa Clara Unified School District was one of the first districts to build affordable housing specifically for teachers, opening the first phase of Casa del Maestro in Santa Clara in 2002. The second phase was completed in 2009.

The catch: Teachers can stay there only for a maximum of seven years.

The apartment complex was built on the corner of an unused elementary school site. Rents for the 72 apartments are about 80 percent of market rent, between $1,430 for a 722-square-foot one-bedroom unit to $2,195 for a 1,170-square-foot two-bedroom, two-bath unit, said Eric Dill, the school district’s chief business official.

Currently, the complex is fully occupied and has a waiting list.

Rizi Manzon, 39, is one of the lucky few who got a spot in the complex. He drives six minutes from his one-bedroom apartment in Casa del Maestro to his job as chef instructor of the Culinary Arts Hospitality and Management Program at Adrian Wilcox High School in Santa Clara.

Without the apartment, which costs $1,460 a month, Manzon said he wouldn’t be able to live in Santa Clara. A comparable unit would be about $3,500, he said.

Manzon has three years before his seven-year limit is up. “I’ll start looking for a new home,” he said. “If it’s not affordable I will start looking for new employment. Most likely it will come from out of state.”

Many California teachers have already departed to less-expensive states, exacerbating California’s teacher shortage. An EdSource analysis of Census Bureau data found that about 40,000 teachers left the state between 2013 and 2017, although it is not clear if they left because of housing costs. That was an increase of 22 percent over the previous five-year period.

Others are commuting hours to get to work, said Sarah Chaffin, founder of Support Teacher Housing.org. “Think about driving two hours to get to work,” Chaffin said. “Would anyone be focused after a two-hour commute? That isn’t good for the teacher. It isn’t good for the students.”

San Francisco will have its first affordable housing complex for teachers in 2023. The San Francisco Unified School District is working with the city of San Francisco to build the Francis Scott Key Annex Educator Housing complex, which will have 100 units.

Residents of the Francis Scott Key Annex must earn between 40 percent and 120 percent of the median income in the area, or $37,000 to $150,000. The average teacher salary in San Francisco Unified is $82,000, said Laura Dudnick, district spokeswoman.

Los Angeles Unified has built three below-market apartment complexes for the district’s workforce in the last 10 years, but not without controversy. The complexes that were initially intended for teachers don’t house any.

Because the complexes were built using federal tax credits, all tenants had to meet federal income guidelines for affordable housing. Even its lowest-paid teachers earned too much to be eligible for the units, said Krisztina Tokes, deputy chief facilities executive for Los Angeles Unified. Lower-paid district employees now live in the apartments.

Santa Clara Unified was able to avoid the problems of Los Angeles by financing Casa del Maestro with the sale of certificates of participation, which generally enables the holder to share in the revenue of a project, in this case, the rent.

“Because of that, our teachers do not need to qualify as low-income to live in our teacher housing … they just need to be our teachers,” Dill said.