CHICAGO -- Chicago teachers and the nation’s third-largest school district struck a tentative deal on a new contract late Monday, minutes before the deadline, averting what would have been the second major strike since 2012 for Chicago Public Schools just hours before union members were set to hit the picket lines.

Chicago Teachers Union President Karen Lewis said at a news conference just before midnight Tuesday that after more than a year of negotiations, the two sides had hammered out an agreement that isn’t perfect but is good for students, teachers and the city.

The deal still must be approved by the union’s House of Delegates and the full membership, a process that could take weeks.

Get Breaking News Delivered to Your Inbox

“There will be classes in the morning,” she said. “It wasn’t easy. Clearly, as you all know, we had some issues. ... We’re very pleased we were able to come to this.”

“We don’t sell,” Lewis said when asked if she would lobby members to approve the deal.

Chicago Mayor Rahm Emanuel said the proposal ensures teachers are respected and “appropriately rewarded.” He said it also would strengthen CPS finances and reassure parents and taxpayers that the two sides were able to work together.

“Students across Chicago will be in school this morning and on the path to a stronger and brighter future,” Emanuel said at an early morning news conference at City Hall.

Lewis gave few details of the four-year proposal, though she said it included cost-of-living increases in the third and fourth year and that it doesn’t require current teachers to pay more toward their pensions - a change CPS sought and the union rejected earlier this year. But future CPS hires would have to pick up that additional pension cost, Lewis said.

There was no immediate comment from CPS, and no details about how much the deal would cost or how the financially struggling district would pay for it.

A walkout would have meant “a repeat of the 2012 teachers strike that brought national political embarrassment to Chicago Mayor Rahm Emanuel,” observes CBS Chicago.

The CTU had directed its roughly 28,000 members to report to picket lines Tuesday morning unless they heard otherwise from union negotiators for a walkout that would have affected nearly 400,000 students.

The two sides held negotiations throughout the weekend. On Monday afternoon, teachers picked up strike placards and painted banners. Earlier in the day, parents and other supporters rallied across from Mayor Rahm Emanuel’s home.

“Nobody wants to go on strike but I think the teachers finally said ‘Enough is enough,’” Nate Rasmussen, a preschool teacher at Beasley Elementary School on the city’s South Side said prior to the tentative deal. He said the district’s 2013 closing of some 50 schools, layoffs of thousands of teachers in recent years and other spending cuts have made the job tougher.

Teachers have been without a contract since June 2015. The union wanted no cuts to salary or benefits and an additional $200 million - or $500 per student - in spending to ensure adequate staffing and “to accommodate the needs of our children,” Lewis said Friday.

CPS has said it is working within the framework of a January offer, which included pay increases and a cap on privately operated charter schools but would have required all teachers to contribute more to their pension costs. The union turned it down in February.

CPS officials say the district is facing serious financial constraints, due largely to soaring pension costs and a flawed state school funding formula.

About two-dozen people with Parents 4 Teachers rallied in Emanuel’s leafy Ravenswood neighborhood on the city’s North Side Monday morning.

Organizer Erica Hade has several children in the public school system and lives across the street from a school. She said she sees teachers arriving for work at 6 a.m. and leaving 12 hours later.

“How can parents not be supportive of teachers?” she said.

Jim Tormey, a 52-year-old father of two children who attend CPS, spoke with the demonstrators. Afterward, he said he had some sympathy for teachers but that his feelings were mixed.

“There are ebbs and flows in that sympathy,” he said. “We love our teachers, but we want our kids not to miss school because of a strike.”

During the last major strike in 2012, teachers were out for seven school days.