Los Angeles public schools and the union representing the district’s teachers said they had reached a tentative agreement to reopen school buildings next month, paving the way for in-person learning to resume in the nation’s second-largest district.

Los Angeles, with more than 600,000 students, is one of the last remaining large urban districts to remain almost fully remote, as teachers and district administrators there resisted reopening while infection rates in the area were high.

Under the deal announced Tuesday, preschool classes, elementary schools and services for students with disabilities are to resume by mid-April, with secondary schools reopening at the end of April. It is contingent on teachers being vaccinated against the coronavirus, health precautions and Los Angeles County exiting the most restrictive tier of health regulations, which is expected shortly.

The announcement of the deal was made in a joint statement by Austin Beutner, superintendent of the Los Angeles Unified School District, and Cecily Myart-Cruz, president of United Teachers Los Angeles (UTLA).

“The right way to reopen schools must include the highest standard of covid safety in schools, continued reduction of the virus in the communities we serve and access to vaccinations for school staff,” they said. “This agreement achieves that shared set of goals.”

The tentative agreement must be ratified by the school board and the UTLA membership.

Under the deal, elementary students will have access to daily in-person school, with some students in buildings in the morning and others in the afternoon. Preschoolers will have full-day in-person school available. Families may opt to continue with fully remote school as well.

The agreement calls for all students and staff to be tested for the virus before returning to campus, with weekly testing after that. Masks will be required. The district said it has already spent more than $120 million to upgrade air filtration systems, provide personal protective equipment and add custodial staff.

The Centers for Disease Control and Prevention has recommended that districts open for hybrid learning for elementary schools even if virus rates in the community are high.

For months, the teachers union in Los Angeles has resisted a return to classrooms, demanding that teachers be vaccinated first, among other protections.

This month, the vaccine was made available to teachers in California, and Gov. Gavin Newsom (D) recently set aside 10 percent of new doses for educators. Newsom also reached an agreement with state lawmakers to send state funding to help districts pay costs associated with reopening.

It’s unclear how many children will take advantage of reopening. A survey in December found that just a third of parents wanted to send their children back to buildings. In other districts, families of color have been particularly reluctant to return.

The L.A. announcement is part of a spring wave of large districts reopening school doors. This week, in-person school began for at least some students in Cleveland, Detroit, Philadelphia, Memphis and Birmingham, Ala.

California accounts for a large share of the school districts where there is no in-person option today.

Overall, there has been a steady march in recent weeks toward more face-to-face classes. As of Sunday, 47 percent of K-12 students attend schools where traditional in-person, everyday classes are available, according to tracking from Burbio, a data firm. About 29 percent attend schools with hybrid models that mix in-person and remote learning. That leaves about 24 percent in fully remote districts, a share that has been falling each week.