Tommy McNamara celebrates his winning goal against NYCFC. (Vincent Carchietta-USA TODAY Sports)

A former New York City FC player came back to haunt the home team Saturday night.

Former NYCFC midfielder Tommy McNamara snapped a 2-2 deadlock in the 88th minute to boost the New England Revolution to a 3-2 triumph at Red Bull Arena before a crowd of 4,929 in Harrison, N.J. Saturday night.

The win allowed the Revs (6-1-2, 20 points) to maintain first place in the Eastern Conference with their fourth consecutive win while seventh-place City (11), in its first game back after the international break, dropped to 3-3-2.

“I feel today that we’ve been more open than we have been in the other games,” NYCFC head coach Ronny Deila said. “I felt like we never had full control of the game defensively but offensively we were dangerous and created chances. We can talk as much as we want but we have to take chances when we have them. I feel like we were a little too passive with our pressure in the first half but the second half we went for it, and I think the boys worked really hard.

“They really went for it and we’ll come back and do it again. Of course when you go so hard like we did we have to go up and down and they punished us with their chances and we didn’t take our chances. For me it’s positive that we created a lot but at the same time we had been so good defensively for a long time but today we were more like the first game.”

While he allowed two goals, Revolution goalkeeper Matt Turner made the saves when it counted. He saved Taty Castellanos’ penalty kick and denied Maxi Moralez from close range a minute into second-half stoppage time.

McNamara’s first goal as a New England player climaxed a busy, four-goal second half – two tallies by each team. Tajon Buchanan’s left-wing cross found McNamara, who beat goalkeeper Sean Johnson from close range for the decisive score.

A West Nyack, N.Y. native, McNamara played NYCFC’s first four years before he was selected by the Houston Dynamo in the MLS re-entry draft in December 2018. He played with the club until 2020, when the Dynamo dealt him to New England for Wilfried Zahibo and a 2020 international roster slot.

The Revs drew first blood in the 27th minute on Gustavo Bou’s bullet shot from outside the penalty area.

NYCFC equalized in the 55th minute on Thiago Andrade, only 10 minutes after he made his team debut as a halftime substitute. Andrade, who came on for Talles Magno, put home a Moralez cross past goalkeeper Matt Turner for a 1-1 tie.

Thiago was so excited about his goal, he took off his shirt as he celebrated with teammates and fans. A minute later, he was assessed a yellow card for taking it off.

“I am happy to be a part of such a great team,” he said. “At that moment I got a little too excited and took my shirt off…Being in the starting XI gives me confidence. Coming off the bench I can assist and try to score. Every time I come off the bench I will give my best.”

The visitors, however, retook the lead in the 78th minute as center back Jon Bell headed in Carles Gil’s right-wing cross for his first MLS.

Then it was NYCFC’s turn to score, knotting it up in the 85th minute on second-half substitute Ismael  Tajouri-Shradi’s goal. During a scramble off a corner kick Tajouri-Shradi slotted home from point-blank range for a 2-2 tie.