NEW YORK — Giancarlo Stanton reached a career milestone Tuesday night, hitting his 400th home run as the New York Yankees defeated the Detroit Tigers, 5-1.

Stanton’s two-run homer off reliever Jose Cisnero broke a 1-all tie in the sixth inning. The slugger reached 400 homers in 1,520 career games — fourth-fastest in major league history behind Mark McGwire (1,412), Babe Ruth (1,475) and Alex Rodriguez (1,489). Albert Pujols is fifth at 1,523.

Stanton’s 451-foot laser to left-center was caught by a fan with a glove in the front row of the elevated bleachers above Detroit’s bullpen. The large videoboard displayed the No. 400 milestone and Stanton — often the target of boos at Yankee Stadium since arriving in 2018 — came out of the dugout for a curtain call, doffing his helmet to the crowd of 31,553.

“It’s definitely a cool, little wake-up call, bigger picture ordeal,” Stanton said of reaching No. 400. “Doesn’t change much in terms of how the year has gone. But we do have a month left, so that’s all I can really focus or pay attention to.”

The 2017 NL MVP with the Miami Marlins, Stanton became the 58th big league player to reach 400 home runs and 10th to do it with the Yankees. And after the game, he was able to retrieve the ball.

“Guy made a great catch on it, I just met him outside,” Stanton said of the fan who caught the milestone ball. “I’m going to give him and his family balls and bats. It’s cool to be able to meet him.”

DJ LeMahieu hit his second leadoff homer in four games and Gleyber Torres had a two-run double for the last-place Yankees (69-69), who have won four straight and seven of eight to get back to .500 for the first time since Aug. 15.

But the night belonged to Stanton, and that wasn’t lost on New York manager Aaron Boone.

“I’m really excited for him, because I know what he puts into it, and I know what it means to him,” Boone said. “I know the kind of teammate he is. We have a lot of guys in there that aren’t selfish players, they are doing it to win at the highest level, and G has always embodied that here.”

And given the type of year the Yankees — not to mention Stanton — have had, Boone made sure to note the standing ovation.

“It was very cool to see him get that moment,” he said. “And it was in a big spot in the game.”

According to ESPN Stats & Information research, the only other active player with 400-plus home runs is Detroit’s Miguel Cabrera, who went 1-for-3 with the Tigers’ lone RBI in the loss.

The Associated Press contributed to this report.