The labor impasse at Community College of Philadelphia appears to be over.

Tentative agreements are expected to be reached by the end of the night for all three bargaining units involving faculty and support staff, union copresident Junior Brainard said shortly after 10 p.m.

“It’s been a long, grueling process,” he said.

No details will be released until Thursday so the union has time to brief members on the agreements, he said.

The agreements would bring an end to three years of contentious bargaining that nearly culminated in a strike at the 27,800-student college just weeks before the semester’s end.

Despite the tension associated with four consecutive days of very long bargaining sessions, said Judith Gay, vice president for strategic initiatives and chief of staff, “at the end of the day, we all believe in the mission of the institution.”

“With a lot of time and effort on everybody’s part, we were able to come up with a successful resolution.”

Gay credited state mediator Bill Gross and Richard Lazer, Philadelphia’s deputy mayor of labor, with helping to secure a deal.

Lazer met with union leaders Wednesday evening to see whether he could help broker a deal and whether the city could leverage any more funds to assist.

“He’s been intensively involved for the last few weeks," said John Braxton, copresident of the 1,200-member union representing faculty and support staff. “He’s been very helpful.”

Lazer did not commit to providing more resources, Braxton said, but he was trying to help. It was unclear late Wednesday whether the city offered any money to help close the deal.

City spokeswoman Lauren Cox said the administration was pleased that things worked out.

“The administration was happy to assist in the mediation process, and we are glad that a tentative agreement has been reached. We look forward to it being ratified,” Cox said in an email.

Mayor Jim Kenney previously proposed a $1.3 million increase in the college’s funding for next year for a total of $33.8 million. City Councilman David Oh recently introduced a bill calling for a much more substantial increase. The bill would transfer $19.25 million from the city’s general fund to the college, raising the city’s funding level to one-third of CCP’s operating costs.

The latest round of negotiations began at 11 a.m., with a mediator assisting, and were still underway as final details were being worked on. That session followed more than 17 hours of negotiations Tuesday that ended after 3 a.m. on Wednesday without an agreement. Lengthy sessions also were held Sunday and Monday.

The four-day marathon comes after three years of largely stagnant negotiations that failed to produce an agreement.

If a strike had been called, it would have been the union’s first since a two-week walkout in 2007, and it would have had the potential of shutting down classes a month before commencement.

Pressure at the college had been building for months, with escalating demonstrations, public statements, and posturing.

In January, CCP president Donald “Guy” Generals said the college was considering imposing its last best offer, details of which were released in May. That proposal, retroactive to Sept. 1, 2016, and running through Aug. 31, 2021, would give union members more than a 10 percent cumulative raise, but also would require heavier workloads for newly hired faculty, as well as health-care contributions.

It’s unclear how much the tentative agreements differ from the college’s last best offer.

The minimum starting salary for a full-time faculty member is $50,529, with the average below $70,000. Some support staff earn less than $13 an hour.

Faculty and support staff have been operating under the terms of a contract that expired in August 2016. The sides have been divided over faculty workload, health insurance, and compensation.

The agreements will bring a period of labor peace to the campus. It will be a little longer than the previous contract of five years but not as long as the eight years the union sought, Gay said. It is retroactive to 2016.