Yangel Herrera walked off the field in the 12th minute, calling it an early day after collecting his second yellow card. That meant NYCFC would have to play 10 vs. 11 the rest of the way, and the 11 belonged to the red-hot Chicago Fire, the proud owner of an 11-match MLS unbeaten streak.

But City didn’t seem fazed after losing the midfielder, just more determined.

“No one dropped their head when we went a man down,” goalkeeper Sean Johnson said.

David Villa and Frederic Brillant scored early in the second half and Johnson dove all over the place to stop shots near the end to try to hold off his former team.

Johnson finished with seven saves and NYCFC survived Saturday at Yankee Stadium, claiming a 2-1 win to pull one point back of Chicago for second in the East.

“It’s amazing,” Villa said. “ . . . This was a very important day for the club. I think in the three years, this is one of the best performances of the team . . . I think we showed to everybody today that watched our game that we are strong.”

This was the middle leg of a challenging three-match stretch against the top two teams to date in MLS and the conference — home vs. Toronto and Chicago and away against Toronto next Sunday.

advertisement | advertise on newsday

City had to spit out the bad taste of Wednesday’s win-turned-draw on a penalty kick in stoppage time that gave Toronto sole possession of first. Then came the need to shake off the shorthanded adversity.

“I saw a team who didn’t want to lose the game, even when we went down with 10 men,” coach Patrick Vieira said after NYCFC improved to 11-6-4, good for 37 points.

After a scoreless first half, Villa delivered in the 47th minute. Jonathan Lewis sent a pass to the Spanish striker, and he volleyed it with his right foot from just outside the box. The ball got past Matt Lampson and went into the left corner of the net for Villa’s 14th goal.

Brillant followed with another in the 50th minute. The defender’s header was punched out by Lampson, but Brillant was right there in front to head in the rebound.

In the 54th minute, David Accam scored for the Fire (11-4-5, 38 points) on a shot from about 25 yards out that hit the bar and landed inside the goal.

@NewsdaySports

But Johnson protected the lead from there, making his diving stops on Arturo Alvarez in the 82nd minute and Juninho in the 85th. The right post got in the way of Juninho’s attempt in stoppage time and Alvarez missed wide on another chance to tie.

Johnson also went up to make two nice saves late in the first half against his team from the previous seven seasons. He said this game wasn’t about that for him.

“At this point, with the teams that are ahead of us, we have the opportunity to make up ground,” Johnson said. “This was a really big game.”