A deal reached between the MTA and the Transport Workers Union will give unionized subway and bus employees 8 percent raises over five years — while sparing riders fare hikes.

“We have a fair wage settlement but most importantly, no impact on fares,” said MTA boss Thomas Prendergast.

Transit workers will get retroactive pay hikes of 1 percent for 2012 and 2013, followed by 2 percent increases in 2014, 2015 and 2016.

Workers for the first time will get two weeks of paid maternity/paternity leave, as well as improved vision- and dental-care insurance benefits.

Their contract had expired in early 2012. During negotiations on a new deal, the union had focused on how its workers were instrumental in rebuilding the transit system after Hurricane Sandy.

Talks progressed well on Wednesday between the MTA and union president John Samuelsen, who then asked Gov. Cuomo to help finish the deal.

“It’s been a very long two years, a two-year fight,” Samuelsen said.

As part of the agreement, transit workers will chip in 2 percent of their base pay for their health-care benefits, up from 1.5 percent.

City municipal workers don’t chip in for their health care.

MTA workers also gave concessions on the time it takes to get to the top of pay scales, from three to five years, sources said.

Higher revenues in the budget from real-estate taxes and record ridership will also go toward the raises — sparing riders from fare hikes, sources added.

A state comptroller’s report last fall revealed that the MTA had taken in almost $2 billion more in new resources than it had expected in its five-year ­financial plan.

The union board OK’d the deal late Wednesday, with MTA-board approval due.

MTA board member ­Allen Cappelli said he supported the agreement.

“MTA transit workers not only saved the system during Sandy, but operate one of the best transit operations,” he said.

Cuomo said he does not believe the MTA deal will have any effect on labor negotiations with the city’s municipal workers.

“The mayor will negotiate his contracts separately,” the governor said.

Sources said the agreement with the TWU could impact negotiations between the MTA and unionized LIRR workers, who have threatened to strike this summer.

A board appointed by President Obama in the LIRR talks is likely to look at the TWU settlement while considering both sides’ last offers, before recommending final action, sources added.