Two bus companies and a union representing their workers have reached an agreement on a new contract to avert a strike that would have gone into effect as early as Tuesday.

A spokesperson for Teamsters Joint Council 16 announced the agreement Monday evening just after 10 p.m.

The agreement was also confirmed on the NYC Public Schools Twitter account.

In a statement, Demos Demopoulos, Secretary-Treasurer of Teamsters Local 553, said, "When workers stand together, they can win good jobs for their coworkers and their families. This was always bigger than two companies and we will continue working with our allies in the labor movement to raise standards in the school bus industry."

A spokeswoman from the Department of Education also issued a statement, saying, "We are pleased to report that Jofaz Transportation and Y&M Transit have reached a tentative agreement with their bus drivers' union and all buses will operate tomorrow as usual. We are grateful to families and educators for their patience and support as we prepared contingency plans to ensure transportation alternatives for students and families."​

Teamsters Local 553 previously said 85 percent of its members at Jofaz Transportation and Y & M Transit voted to authorize a strike last week.

Both companies serve around 12,000 public school kids and 2,500 private school kids, mostly in parts of Brooklyn, Queens and Staten Island. 

Teamsters Local 553 says members still need to approve the agreement.