One of the Bay Area’s biggest school districts averted a teachers strike, while another smaller district approved dozens of layoffs.

At around 3:00 a.m. Friday morning, after 18 hours of negotiation, Oakland Unified School District (OUSD) and the teachers union reached a tentative agreement to avoid a teachers strike.

The two sides came to a two-year agreement that the union said increases wages, thereby stabilizing staffing.

The teachers reached their agreement just after the school board voted to lay off 400 employees at the district’s 80 schools and the central office.

Meanwhile, there’s no celebrating for San Jose’s Alum Rock Union Elementary School District (ARUESD), as the board moved forward with a plan to lay off 38 non-classroom employees.

The employees affected include bus drivers, executive assistants, custodians and nine managers.

NBC Bay Area’s Kris Sanchez has more in the video above.