Rivera, who is retiring after this season, shows off his MVP trophy. He never allowed an All-Star Game earned run.

Mariano Rivera was held in the bullpen out in right-center field until Neil Diamond had sung the final words of Sweet Caroline in the middle of the eighth inning during Tuesday night’s All-Star Game.

And then the opening notes of Metallica’s Enter Sandman – his Yankee Stadium theme song but unfamiliar on the road – rang out over the public-address system as the greatest reliever of all-time jogged toward the mound. The record crowd of 45,186 gathered at Citi Field on this humid summer night rose and cheered, knowing this was a moment people will remember much more than the American League’s 3-0 victory.

Quiet, reserved and understated during nearly a quarter-century in a sport that took him from Panama to the pantheon of pinstriped pitchers, Rivera was being honored with that rarest of baseball tributes – a solo bow.

As he reached the brown circle in the center of the green diamond, Rivera realized he was the only person on the field.

Sinatra. Springsteen. The Mick – Jagger and Mantle. They all got to stand in the spotlight alone. And now it was Rivera’s turn.

He took off his cap, waved it to all sides of the ballpark. He touched his hat to his heart.

His AL All-Star teammates stood by the third-base dugout rail and applauded, just like the fans. So did his NL opponents on the first-base side. With no other players in fair territory, he finally started tossing his warmup pitches to catcher Salvador Perez.

Like Ted Williams at Boston’s Fenway Park in 1999 and Cal Ripken Jr. at Seattle’s Safeco Field two years later, one man transcended all the rest of the gathered talent.

“You’re supposed to know your team is behind you,” Rivera said. “I didn’t know what to do. Just keep throwing the ball, I guess, because it was so weird.”

And then, after a 90-second standing ovation, eight AL position players came on the field. Normalcy resumed. Rivera threw 16 pitches – all cutters – and retired Jean Segura, Allen Craig and Carlos Gomez, sending the side down in order the way he has so many times before.

“He still can pitch for three or four more years. He’s the best,” Gomez explained. “After I got to the dugout, I say I’m going to be history because I’m the last guy Mariano got out in the All-Star Game.”

Rivera was given a hug by Detroit ace Justin Verlander when he got to the dugout.

“It’s kind of surreal for me,” Verlander said. “I just wanted to give him the respect and the respect that he deserved, I just happened to be standing out there and I was the first one he came to. That’s something that I will never forget.”

AL manager Jim Leyland decided to pitch Rivera in the eighth instead of the ninth, worried that if the NL somehow rallied Rivera might not get into the game.

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

Rivera has never allowed an earned run in nine All-Star innings. The only older pitcher to appear in an All-Star game was 47-year-old Satchel Paige 60 years ago, according to STATS. At 43, Rivera was the oldest All-Star since Carlton Fisk in 1991.

Of course, he was selected the All-Star MVP. Never having had a chance for a talk, Mets star David Wright pulled Rivera aside at baseball’s red-carpet event before the game.

“Before it was too late, I had enough courage to kind of go grab him and just tell him how much I appreciate his body of work, the way he carries himself, how great of an ambassador he is to this game,” Wright said. “Forget about the numbers. Forget about being the greatest closer of all-time. The way he carries himself and the way he goes about his business is special.”

After the game, still smiling, sometimes laughing, Rivera spoke in the interview room as his family stood behind him.

“It was tough. It was special,” an emotional Rivera said. “Seeing the fans sharing and both teams standing out of the dugout, managers, coaches, players — priceless.”

Jose Bautista’s fourth-inning sacrifice fly off loser Patrick Corbin stopped a 17-inning scoreless streak for the AL that dated to Adrian Gonzalez’s homer off Cliff Lee two years ago in Arizona. J.J. Hardy added an RBI groundout in the fifth, and Jason Kipnis doubled home a run in the eighth off Atlanta closer Craig Kimbrel.

Rivera and nine other pitchers combined on a three-hitter, with Chris Sale getting the win. Joe Nathan worked the ninth, handing the final ball to Rivera as the AL ended a three-game losing streak and regained home-field advantage in the World Series.

So even when the Mets hosted the All-Star game for the first time in 49 years, the spotlight fell on a rival Yankee.

Hours after the game, a video board at Citi Field reminded people the All-Stars will gather next year at Minnesota’s Target Field.

But the great Rivera won’t be among them.

“It’s been a privilege,” Rivera said to the crowd, speaking on the field after the game. “You guys almost made me cry.”

TV RATING UP SLIGHTLY

The All-Star Game’s television rating was up slightly from last year’s record low.

The American League’s 3-0 victory Tuesday night on Fox earned a 6.9 rating and 12 share, up from a 6.8/12 in 2012.

Played at the Mets’ Citi Field, the game’s viewership got a boost from its trip to the big market of New York. The 11.3 rating there was up 16 percent from a year ago, when Kansas City played host to the game.