Galaxy forward Zlatan Ibrahimovic (9) moves in for a shot on goal against the defense of New York City defender Anton Tinnerholm (3) during the second half. (Gary A. Vasquez-USA TODAY Sports)

CARSON, Calif. — Once teetering on the edge of doom, New York City FC has become one of the hottest, if not the hottest team in all of Major League Soccer.

City has won three consecutive matches on the road.

Its string of victories started at D.C. United, continued at the Montreal Impact and then at the LA Galaxy Saturday.

Heber and Maxi Moralez scored goals late in the first half and NYCFC (4-1-6, 18 points) made sure that stood up en route to a 2-0 victory at the StubHub Center. The Galaxy (22), which is in second place in the Western Conference, fell to 7-4-1.

“I am very happy because when you asked me about that last week I said the same thing, maybe we found the right system for us because this is three clean sheets in a row when we play away,” City head coach Dome Torrent said. “But it is not about that, it is about the feeling, sometimes you are not able to score but the feeling is much better, and right now this team has the possibilities to win some.

“We feel good. That is important for us when that happens [shutouts] you have more confidence, even when they have the control or decide to play long balls, if you defend well and fight for every single ball, you have more possibilities to get points.

“Right now when I see the face of our team, I know they are happy when we are playing this system. We didn’t start well, maybe we deserved more.”

NYCFC turned the game on its end at the end of the opening half.

First, Brazilian striker Héber netted his third goal in five starts after he reacted first to goalkeeper David Bingham’s parry to hammer home a rebound from close range in the 44th minute.

Six minutes into stoppage time, City doubled its lead after Anton Tinnerholm’s cross hit a hand and a penalty kick was called after a lengthy Video Assistant Referee consultation.

Moralez, who had failed to convert on two penalty kicks this season, did so this time, drilling the ball into the lower corner for a 2-0 advantage.

In the 30th minute, LA’s Zlatan Ibrahimovic put the ball in the net against the run of play on a counter, but the officials ruled the goal was offside, much to the relief of the City backline, which was caught outnumbered.

Goalkeeper Sean Johnson has recorded three successive clean sheets.

“I take pride in that,” he said. “The past three-four games have been really good, both at home on the road, we have to have that mentality and now that we have set that bar, I think there is another level for us to achieve. Everybody is hungry.”

There was a scuffle with Ibra near the end of the match.

“I don’t think there were any hugs,” Johnson said. “He is just a competitor. I think you guys will watch the replay and decide for yourselves, but at the end of the day, in the heat of the battle, you want to do what you can to protect the guys, make sure we see the game out no matter what and make sure they know we are here to play, we are not going to be walked over.

“I think in any moment, anybody is up for the challenge, including myself and you know, Zlatan is a talented player. He obviously knows what he is doing. He is a clever boy and you know; it is a part of the game. I would be frustrated if I were him too, you know. Can’t blame him for his frustration at that point in the game. Obviously, our boys did a job today to keep him off the scoresheet and he is only happy when he is scoring, so job done. We will take the three points and go back. I think we can look back and say we got the best out of the whole situation today.”