eyJpZCI6IjkzMjY2MzQwIiwibmV0d29ya0NvZGUiOiI5NDIwOTk0MCIsImVmZmVjdGl2ZVJvb3RBZFVuaXRJZCI6IjkzMjEwMDYwIiwibmFtZSI6IkZyb250VG9wIiwicGFyZW50UGF0aCI6eyJpZCI6IjkzMjEwMDYwIiwibmFtZSI6ImNhLXB1Yi0zMDYxMTc2MDkyNzY2MzI4IiwiYWRVbml0Q29kZSI6ImNhLXB1Yi0zMDYxMTc2MDkyNzY2MzI4In0sImFkVW5pdENvZGUiOiJGcm9udFRvcCIsImRlc2NyaXB0aW9uIjoiIiwiaXNGbHVpZCI6ZmFsc2UsImlzTmF0aXZlIjpmYWxzZSwiYWRVbml0U2l6ZXMiOnsic2l6ZSI6eyJ3aWR0aCI6IjcyOCIsImhlaWdodCI6IjkwIiwiaXNBc3BlY3RSYXRpbyI6ImZhbHNlIn0sImVudmlyb25tZW50VHlwZSI6IkJST1dTRVIiLCJmdWxsRGlzcGxheVN0cmluZyI6IjcyOHg5MCJ9fQ==

Anton Tinnerholm celebrates his equalizing goal. (Kelley L Cox/USA TODAY Sports)

SAN JOSE, Calif. — It’s not necessarily how you start, but how you finish.

On Saturday night, New York City FC started horribly, but finished quite well to walk out of Avaya Stadium with a 2-1 MLS victory over the San Jose Earthquakes.

Anton Tinnerholm and Maxi Moralez struck for second-half goals to lift City to the comeback win.

Just as important, NYCFC finished the night atop the Eastern Conference as it remained undefeat at 4-0-1 with 13 out of a possible 15 points. Columbus Crew SC, which entered the day in the first place by goal differential, dropped a 3-1 decision to Vancouver Whitecaps FC. San Jose fell to 1-2-0.

Goalkeeper Sean Johnson was magnificent, making several game-saving stops in the second half. He denied Quincy Amarikwa’s header from point-blank range in the 79th minute with a reaction save and then made a diving stop on Valeri Qazaishvili two minutes later.

“It was a difficult one,” NYCFC head coach Patrick Vieira said. “It was really tough, especially in the last 10 or 15 minutes. I think in the first half after we conceded the first goal, we played at times some really good football. In the second half when we came back, we were a bit more aggressive closing them down. I think it was a really good game of football, not just because we won the game, but because it was two good teams that wanted to win the game. Of course, I’m quite pleased and happy to go back to New York with a win.”

Before the game began City had suffered a vital loss as captain David Villa was a late scratch as he was pulled from the Starting XI only minutes prior to kickoff against the San Jose Earthquakes Saturday night.

Villa, who missed the last two weeks with a calf injury, had to sit after injuring himself during the pregame warm-up. It was not immediately known what type of injury the Spanish international striker had incurred.

Jo Inge Berget took over for Villa at the opening kickoff.

Vieira also missed outside Ben Sweat, who was pulled from the lineup due to the flu.

“Ben Sweat traveled with us, but he wasn’t feeling well and has the flu, so we made a decision not to play him this morning,” he said.

With the match only three minutes old, the Quakes struck as they took advantage of poor marking by City defenders on a corner kick by Magnus Eriksson. Yefferson Quintana had little trouble heading past goalkeeper Sean Johnson.

Four minutes into the second half, however, NYCFC equalized as Tinnerholm fired a shot from atop the right side of the penalty area past goalkeeper Andrew Tarbell for a 1-1 deadlock. It was Tinnerholm’s second goal of the season as he tallied in the win over the LA Galaxy earlier this month.

Moralez connected for the game-winner in the 60th minute off an Ismael Tajouri feed.

SCORING SUMMARY

3’ – SJ– Yefferson Quintana (Assisted by: Magnus Eriksson)

49’ – NYC – Anton Tinnerholm (Assisted by: Maxi Moralez)

60’ – NYC – Maxi Moralez (Assisted by: Ismael Tajouri-Shradi)

DISCIPLINE SUMMARY

29’ – SJ– Anibal Godoy (YC– Unsporting Behavior)

41’ – NYC – Ebenezer Ofori (YC – Unsporting Behavior)

67’ – NYC – Alex Callens (YC – Unsporting Behavior)

74’ – NYC – Yangel Herrera (YC – Unsporting Behavior)

89’ – NYC – Anton Tinnerholm (YC – Unsporting Behavior)

93’ – NYC – Maxi Moralez (YC – Time Wasting)

LINEUPS

San Jose Earthquakes: Andrew Tarbell; Shea Salinas, Harold Cummings (75’ Quincy Amarikwa), Yefferson Quintana, Nick Lima; Valeri Qazaishvili, Florian Jungwirth, Anibal Godoy, Magnus Eriksson; Chris Wondolowski, Danny Hoesen

SUBS UNUSED: Matt Bersano, Francois Affolter, Joel Qwiberg, Jahmir Hyka, Fatai Alashe, Jackson Yueill

New York City FC: Sean Johnson; Anton Tinnerholm, Alex Callens, Maxime Chanot, Saad Abdul-Salaam; Yangel Herrera, Ebenezer Ofori, Maxi Moralez; Jesus Medina (95’ Kwame Awuah), Jo Inge Berget (69’ Sebastien Ibeagha), Ismael Tajouri-Shradi (91’ Cedric Hountondji)

SUBS UNUSED: Brad Stuver, Tommy McNamara, James Sands