Philadelphia’s transit system resolved a labor dispute with its workers’ union on Monday, ending a major strike that threatened to carry into Election Day.

A day before Philadelphians headed to the polls, the Southeastern Pennsylvania Transportation Authority and the Transport Workers Union agreed on a new contract after a week-long shutdown. The looming election brought pressure to bear on both parties to hash out their differences.

It isn’t clear what impact the strike would have had on the election. But Pennsylvania has become an unusually important state in 2016, and if voters in the Democrat-heavy city had had less time to get to the polls, it could have hurt Democratic nominee Hillary Clinton and benefited GOP nominee Donald Trump.

Transport Workers Union 234 announced Monday morning that they had reached a tentative five-year deal with SEPTA that would still need to be ratified by employees. The two sides had been hung up on disagreements over the pension plan, health care costs and scheduling.

SEPTA said transit services would be phased back in on Monday.

“We believe the agreement is fair to our employees, and to the fare-paying customers and taxpayers who fund SEPTA,” Pasquale T. Deon, chairman of the transportation agency’s board, said in a statement. “It provides for wage increases, pension improvements, and maintains health care coverage levels while addressing rising costs.”

The workers’ contract expired at the end of October, incidentally close to the presidential election. The timing gave the union strong leverage in negotiations. Union members voted against extending any deadlines in order to force SEPTA to agree to a contract before people needed to get to the polls.

After the strike began, SEPTA sought a court injunction to force workers back onto the job ahead of the election. That injunction was not granted on Friday. The agency would have made its argument again in court Monday, had it not reached a deal.