New York City’s school buses will keep running next week after city officials and bus companies reached a last-minute deal to avoid service disruption that could have caused chaos for many of the 150,000 students who rely on yellow buses to get to school.

The deal comes one day before contracts were set to expire for multiple major yellow bus providers. Parents had already started making backup plans, especially those whose children have disabilities or live in shelters and rely on bus service.

Rich Bamberger, a spokesperson for the lawyers negotiating for some of the largest bus companies, said the group would sign a temporary extension to maintain service, while continuing to push for a longer-term contract.

“In the end, this is about the children and our employees, period,” he said. “Buses will be running Monday.”

Gregory Faulkner, chair of the Panel for Educational Policy — which is in charge of approving contracts — said service would continue while officials begin to work towards new and improved contracts with stronger accountability measures.

“Today’s decision is a victory for the children of New York City,” he said.

He said panel members would consider a longer extension — spanning two to three years — next month.

The bus companies had pushed fiercely for a five-year deal, which the panel rejected.

A spokesperson for the Department of Education said yellow bus service will run as usual on Monday, after vendors agreed to continue service and avoid disruption for the city’s most vulnerable students.

The announcement came as parents began to panic about how their children would get to school next week. The city had announced contingency plans, including OMNY cards and rideshare, but some parents said those measures would not be enough to get students with complex disabilities to school.

“Mayor Adams has remained committed to ensuring that our public school students can safely get to and from schools, and we are glad to hear that thanks to our efforts, our contracted school buses will continue to serve students on Monday without disruption," said Liz Garcia, a City Hall spokesperson. "We expect to be directly informing families about this resolution [Friday]”

The dispute centered on decades-old contracts that many parents say perpetuate a dysfunctional system. Parents have complained for years about problems – including inconsistent service, no-show buses and delays. Many parents and advocates have called on city officials to reject long-term contract extensions so that they could negotiate new terms with better service.

Some of the largest companies, including Logan Bus Co. Inc., Pioneer Transportation, Total Transportation Corp. and Consolidated Bus Transit, saw their contracts expire over the summer, and city officials had been relying on month-to-month extensions until they could iron out new requirements.

But last week, the companies said they would be forced to halt business and lay off drivers if the city did not sign off on a five-year contract this week.

Parents, drivers and bus company owners packed a Panel for Educational Policy meeting on Wednesday night, calling for continued service while raising dire concerns about school bus operations.

“The bus system is broken,” said Queens parent Laura Simpson. “Families and drivers pay the price.”

She said this summer it took two hours for her 6-year-old son to go two miles to get to Summer Rising and there was no working air conditioning on the bus. During the school year, she said he misses crucial instruction time because of bus problems.

Bus company executives acknowledged families’ concerns, but said a long-term contract is necessary to maintain buses and manage labor costs. They said Adams administration officials had already negotiated the terms of a five-year deal with some new requirements. They also said some of the problems lie with the city’s Office of Pupil Transportation.

“The public is right to challenge us to be better, to do better,” said Joseph Sgro, senior vice president of Total Transportation. “However, it's worth noting that the vast majority of issues were for things like routing, elongated travel time, and crowded buses, which are all things that fall outside of the school bus companies’ control. We remain committed to doing our part in improving the service.”

Students rely on yellow buses provided by more than 40 companies to get to school. Throughout the week, smaller companies filled out paperwork saying they would continue service, but the largest companies remained holdouts until Thursday night, a day before the deadline.

Now, advocates for better bus service hope the temporary deal will lay the groundwork for stronger contracts.

This story has been updated with comment from City Hall and the Department of Education.