Teachers in the Chicago Public Schools, the nation's third-largest school district, had been working without a contract since June 2015, and they were prepared to strike.

The Chicago Teachers Union had told its some 28,000 members to report to the lines Tuesday morning — unless plans changed.

But negotiators reached a tentative contract agreement minutes before a midnight deadline. Talks had been taking place throughout the holiday weekend.

The last time Chicago teachers walked off the job was in 2012, and that strike lasted for seven school days.

Chicago Teachers Union President Karen Lewis held a late-night news conference, which was covered by the Chicago Tribune.

"What I will tell you is that it wasn't easy, as you all know," Lewis told reporters late Monday, flanked by CPS Chief Education Officer Janice Jackson and members of the union's Big Bargaining Team."Clearly, we had some issues and there's some things we're going to still be working on. But what we found is that what we ended up with is something that's good for kids, is good for clinicians, is good for paraprofessionals, for teachers, for the community and we're very pleased that we were able to come to this tentative agreement," Lewis said.

Chicago Mayor Rahm Emanuel was monitoring the talks and the Tribune reports he held a news conference shortly after midnight.

"The teachers' hard work will be respected in this contract, and appropriately rewarded. Chicago Public Schools' finances will be stronger and on firmer ground because of this agreement. Parents and taxpayers will be relieved, and more importantly, reassured, that we all came together to work together with a common purpose," Emanuel said.

Parents had been caught in the middle — trying to support their children's teachers but not wanting to endure another walkout.

As for what is contained in the tentative deal, The Associated Press reports:

The four-year proposal includes cost-of-living increases of 2 percent in the third year and 2.5 percent in the fourth year. It doesn't require current teachers to pay more toward their pensions — a change CPS had been seeking and the union rejected earlier this year. Future CPS hires would have to pick up that additional pension cost. The tentative agreement also addresses class sizes for younger grades by assigning an assistant to any class with more than 32 students.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.