Taty Castellanos celebrates his second goal of the day. (Sam Navarro-USA TODAY Sports)

Taty Castellanos scored on either side of halftime to lift New York City FC into the MLS Cup Playoffs with a 3-1 win over Inter Miami CF in Fort Lauderdale, Fla. on Saturday.

The victory boosted NYCFC into third place in the Eastern Conference with a 14-11-8 mark and 50 points, two points beind second place Nashville SC (12-4-16, 52).

Castellanos tallied in the 33rd minute.

After Miami’s Nicolas Figal struck for the equalizer in the 56th minute, the Cityzens forward bagged his brace on the hour as he raised his team-leading goal total to 17.

Talles Magno gave the visitors some breathing room in the 83rd minute.

“It’s a good learning [experience’,” NYCFC head coach Ronny Deila said. “We have a really young squad, that is unbelievably good when we feel safe and do the right things. We haven’t managed to deal with the ups and downs so well. The top level has been really really good and the bottom level too low. The only way to learn is to try and to play games, home and away.

“At home we are safe, we feel the supporters, we feel the stadium and we have been really really good. Away, we are fighting for every point. No one has outplayed us. It’s always been one goal. Today, we were exceptional in many ways. We come down here, it’s a difficult place to come to. It’s hot, it’s a very fast and quick pitch, very different grass than what we are used to. We put a performance under the pressure we are under as well.

“I am so impressed by the boys on what they did today. They grew throughout the game, they got better and better. Of course, when you have Sean [Johnson], today he was amazing. He didn’t make as many saves but the two that he had was so important for the game, and Taty also scored when we needed it. We have been talking about being better in the two boxes, and today we had a match winner in the front and a match winner in the back, and you can see what this team is really about.”

City midfielder Keaton Parks said the victory gave “us a lot of momentum, a lot of confidence going into these next games. Obviously it helps us keep homefield advantage at least for the start of the playoffs.”