St. Paul Public Schools and the teachers union have reached an agreement on a new contract.

The tentative deal averts a strike that had been set for Tuesday. The St. Paul Federation of Teachers announced at 2 a.m. Monday that it had finally reached an agreement following seven consecutive days of mediation.

The 2-year contract includes all three bargaining units, including 3,200 teachers, educational assistants and professional staff. Neither side offered deals about the agreement.

The district said it couldn't afford the 2.5 percent raises the union had sought.

The district also pushed for larger class sizes, while the union wanted the opposite, especially for English learners and special education students.