The MTA and transit workers union reached a tentative contract agreement Monday after failing to meet a midnight deadline, union president John Samuelsen said.

“We won a tentative contract with solid raises and other strong economic gains, moving transit workers well ahead of inflation and greatly improving their quality of life,” Samuelsen said. “That was our goal. We achieved it.”

Contracts between the MTA and TWU Local 100, which represents about 38,000 MTA employees, had expired at 12 a.m. Monday. 

The agreement comes after nearly two months of negotiations, which were kicked off with a massive union rally outside MTA headquarters in November. 

Main topics under negotiation included wage increases and safety reforms for the workers who operate, maintain and repair the agency’s NYC Transit bus and subway network.

Both parties had been negotiating all day Sunday at the Andaz Hotel on Wall Street, but did not come to an agreement by the midnight deadline, piquing concerns about an impending strike.

“We came to a dead stop more than once,” Samuelsen said. “The leadership team for the union was getting ready to leave the hotel more than one time. Discussion there was sometimes very tense.”

Contract negotiations are believed to be one of the last major handlings of outgoing MTA Chairman Tom Prendergast, who has maintained an unusually affable relationship with the union. That’s in part because Prendergast’s history at the agency and knowledge of workers’ concerns. Prendergast has said that an improved financial outlook for the MTA would help smooth out contract negotiations.

Samuelsen highlighted that an agreement was reached with no concessions. He said the union was able to negotiate wage increases above the 2 percent rate of inflation without ceding issues like health benefits.

Some victories include a 75-cent hourly pay raise in addition to the wage increases for bus operators who drive articulated buses, which increase passenger capacity but are more difficult to maneuver on city streets, according to Samuelsen. There was also an agreement to improve accomodations in facilities for the roughly 5,000 female transit workers, he said.

“So many of the MTA facilities were designed without the specific needs of women transit workers in mind,” said Samuelsen, noting that restrooms and locker rooms were designed 50 years ago, when the workforce was more male-dominated. “We received a commitment from the company to build out modernized employee facilities that we will jointly develop to demonstrate the high level of respect that female transit workers deserve.”

Prendergast said the tentative contract "is responsive to the needs of the hard-working men and women in the TWU Local 100 and is an affordable agreement that can be accommodated within our financial plan."

He added that the contract will need to be ratified and approved by the MTA board.

More details about the new contract were not immediately available.