MLB

WATCH: Yankees’ Rivera has surreal entry before perfect inning

American League players applaud as Mariano Rivera  takes to the mound.

American League players applaud as Mariano Rivera takes to the mound. (AP)

STANDING MO: Mariano Rivera (above) tips his hat to the crowd and to his AL teammates, who came out of the dugout to give him an ovation but did not come out onto the field so he could soak up the spotlight. (Getty Images)

Mariano Rivera’s AL teammates came out of the dugout to give him an ovation but did not come out onto the field so he could soak up the spotlight. (AP)

(
)

Mariano Rivera got a hero’s welcome on enemy turf last night and made his final All-Star appearance a Sandman Special.

Summoned in the eighth inning of the 84th All-Star game because manager Jim Leyland wanted to ensure Rivera would get to pitch, the Yankees icon was perfect — and named the Most Valuable Player of the AL’s 3-0 domination of the NL before 45,186, the largest crowd in Citi Field history.

“As a team player you don’t look for these things, they just happen,” said Rivera, who became the first Yankees player since Derek Jeter in 2000 to win the All-Star game MVP award. “I’m honored and proud to be a member of the New York Yankees and being able to play for this city and to do it the way I have done.”

[mlbvideo id=”28928745″ width=”525″ height=”300″ /]

Rivera, who is set to retire after the season, entered to a standing ovation and waved his cap to the crowd upon reaching the mound. To let Rivera bask in the moment, his AL teammates delayed in taking their positions, leaving the future Hall of Fame closer alone during the 60-second ovation.

“It felt so weird — basically I was there alone with my catcher,” Rivera said. “I definitely appreciated what they did for me.”

Then, Rivera retired the side in order and departed to more applause.

Leyland said it would have been too risky waiting until the ninth to let Rivera pitch. If the NL rallied and took the lead in the eighth, there might not have been a bottom of the ninth.

“You know, I’m probably not the most popular manager in baseball,” Leyland said. “I wanted to make sure I got out of here alive tonight.”

Rivera’s AL teammates also seemed moved by the events.

“I had goose bumps the whole time,” Dustin Pedroia said. “It was nice not to worry about facing him.”

The performance came on a night the NL All-Stars were limited to three hits, one of which came from David Wright, who singled in the seventh. The victory, which carries home-field advantage for the World Series, was the AL’s first since 2009.

Robinson Cano might have suggested “This time, it hurts” as the official game slogan, after Matt Harvey drilled him in the right leg in the first inning. It stood as the snapshot moment — until Rivera’s appearance in the eighth — of the first Midsummer Classic hosted by the Mets since 1964.

Cano, the only Yankees starter, departed with a contusion to his right quadriceps shortly after getting plunked and was long a spectator by the time Joe Nathan threw the final pitch in the ninth.

Harvey, the first Mets pitcher to start an All-Star game since Dwight Gooden in 1988, pitched two shutout innings. Wright finished 1-for-3 with a single in the seventh inning against Greg Holland, but also left a runner stranded at third in the fourth.

Mike Trout had just opened the game with a double, when Harvey drilled Cano in the right leg with a 96-mph missile. Cano remained in the game as Miguel Cabrera struck out, but then walked off the field, replaced by Pedroia. Cano underwent precautionary X-rays, which were negative.

“That was the last thing I wanted to do was go out there and possibly injure somebody,” Harvey said. “As [Cano] was walking by I was trying to get his attention as he was going to first. When he came off, obviously I apologized and made sure that he was OK.”

Cano said there were no hard feelings.

“I know he doesn’t want to hit anybody,” Cano said. “But it’s just part of the game, so what else can you do?”

Jason Kipnis delivered an RBI double in the eighth against Craig Kimbrel to give the AL a 3-0 lead. Adam Jones’ double leading off the fifth against Cliff Lee led to the previous run, which scored on J.J. Hardy’s RBI fielder’s choice.

Harvey threw 32 pitches over two shutout innings in which he allowed one hit and struck out three. After the Cano plunking, he struck out Cabrera on a 92-mph slider and retired Davis before Bautista whiffed, also on a slider.

In the second inning, Harvey retired the side in order. He exited the field to a standing ovation.

“I’m used to walking off in the second inning and going back out there, so I really didn’t pay attention to it,” Harvey said. “I wish I had kind of stayed in the moment a little bit and gave a head nod or whatnot. But the thanks was there and they have been great all year, the fans. I’m very thankful.”

mpuma@nypost.com