David Villa of NYFC celebrates his first of two goal...

David Villa of NYFC celebrates his first of two goal sin the first half during NYCFC's win over the Vancouver Whitecaps on Saturday, April 30, 2016 at Yankee Stadium. Credit: George McNish

Seconds after referee Sorin Stoica whistled to signify the end of the game, New York City FC captain David Villa fell to the ground on his back.

“I was dead,” the emotionally spent striker said. “We played 90 minutes three times in a week.”

If it hadn’t been for Villa and second-half sub Steven Mendoza, City would have been really dead. Instead, they gave their struggling MLS side some life as it snapped a seven-game winless streak with a hard-fought 3-2 victory over the Vancouver Whitecaps at Yankee Stadium on Saturday.

Villa connected twice and Mendoza tallied his first City goal, which broke a 2-2 tie in the 73rd minute. He scored on Tommy McNamara’s cross that deflected off Vancouver defender Tim Parker of Hicksville and gave the team its first home win in six tries.

“I am very happy about the goal,” Mendoza said. “It gives me a lot of tranquility.”

The same could be said about his team, which has struggled to a 2-3-4 record.

It has been a rough start to the season for City, which hadn’t won since its 4-3 triumph in its season-opener March 6.

“I was waiting for the win for quite a while and the players as well,” coach Patrick Vieira said. “They deserved to win the game.”

It also turned out to be a rough start to the game. Only 36 seconds in, goalkeeper Josh Saunders was stripped of the ball by Nicolas Mezquida, who fed Octavio Rivero for a 1-0 lead.

“Conceding the goal woke up us a little bit more,” Vieira said. “We showed real good spirit because we stuck to the way we want to play. That was a fantastic message.”

Villa took center stage. Khiry Shelton stripped former City midfielder Andrew Jacobson of the ball at midfield and fed Villa, who scored in the 35th minute. He converted a spectacular half-volley off of Andrea Pirlo’s corner kick in the 41st minute. Frederic Brillant had a role, grabbing and holding onto Kekuta Manneh and Matias Labas, freeing Villa at the far right post.

“They set a pick,” Vancouver coach Carl Robinson said. “They told us at the start of the year if that happens it will be free kicks against you. I saw my boy getting held. But credit to them. It was a set piece that worked.”

Vieira, a World Cup winner as a player, praised Villa.

“What can I say about David that you don’t know already,” he said. “He is a terrific, fantastic player. When you look at the last two games that he played and the energy that he’s putting on the field is fantastic.”

Saunders atoned for his earlier blunder by blocking Christian Bolanos’ penalty kick in the 63rd minute, only to see the midfielder slot home the rebound for a 2-2 tie. With the game on the line in the 86th minute, he tipped away Erik Hurtado’s close-range attempt.

More soccer news