NEW YORK — Jose Bautista’s sacrifice fly in the fourth inning provided all the offense the American League would need Tuesday night as 10 pitchers combined on a three-hit shutout in a 3-0 win over the National League in the All-Star Game at Citi Field.

The American League snapped a three-game losing streak and improved to 39-43-2 all-time in the All-Star Game. The American League is 19-6-1 since 1988, though, and 8-3 since 2003, when the winner of the All-Star Game began receiving home-field advantage in the World Series.

The shutout for the American League was its first since a 2-0 win in 1990. Paul Goldschmidt’s two-out double in the ninth ensured the National League would not tie the All-Star Game record for fewest hits, also set by the NL in the 1990 contest.

The National League was three-hit for the fourth time since 1995.

White Sox pitcher Chris Sale, who struck out two in two perfect innings and mystified NL hitters with his slider/fastball combination, earned the win.

Arizona hurler Patrick Corbin, who went 11-1 in the first half, took the loss after allowing the American League’s fourth-inning run.

The most memorable moment of the evening occurred at 10:50 p.m., when Metallica’s “Enter Sandman” began playing as all-time saves leader Mariano Rivera jogged out of the American League bullpen to pitch the eighth inning.

Both teams remained in their dugouts and applauded as Rivera made his way to the mound. Rivera, who is retiring after this season, doffed his cap to both dugouts and then waved his cap in every direction of Citi Field as the crowd roared.

Rivera then produced a typical 1-2-3 inning in which he threw just 16 pitches. Once the inning ended, A.L. catcher Salvador Perez trotted out to shake Rivera’s hand and first baseman Prince Fielder patted Rivera on the backside.

Rivera, appearing in his final All-Star Game, was named the Most Valuable Player after he worked a perfect eighth inning in the win.

Players from both teams stayed in the dugouts, stood up and cheered on the top step as Rivera, 43, begain his warm-up tosses before the eighth inning. Rivera, who has four All-Star saves in his illustrious career, then proceeded to post his first hold in his eighth appearance.

He also became the first reliever to receive the MVP award and the last pitcher to win it since Padro Martinez in 1999.

“It was tough. It was special,” Rivera said, according to “To see the fans sharing and both teams standing out in the dugout, managers, coaches, players — priceless. … I’ve never been in a situation like this. The only difference is the World Series. Besides that, this has been right there.”

Rivera retired the side quickly, throwing 16 cutters and getting two grounders and a lineout. He left to a standing ovation.

“There was no other MVP in this stadium than Rivera,” said Chicago White Sox left-hander Chris Sale, who got the win with two scoreless innings.

AL manager Jim Leyland was forced to use Rivera in the eighth rather than the ninth to ensure that the career saves leader would get into the game. Leyland reasoned that if the National League had gone ahead in the bottom of the eighth and shut down the AL in the top of the ninth, the game would be over.

Joe Nathan of the Texas Rangers worked the ninth and closed out the victory for the American League.

“I wanted to pitch. You know the game of baseball,” Rivera said. “Anything can happen. Leyland wanted to make sure that I pitch. It was a great idea. I appreciate him giving me the opportunity to do this, in New York, for the fans here. I think the plan was perfect.”

Rivera, who is retiring at the end of the season, kept his perfect 0.00 All-Star Game ERA intact.

Yankees teammate Robinson Cano, who was forced to leave the game in the first inning after being hit by a pitch, hung around to watch Rivera do what he does best — get people out.

“To be with a guy like Mariano, not only as a player but a person is an honor,” Cano said.

The National League had just four baserunners, only two of whom got into scoring position. Andrew McCutchen, who entered as a pinch-runner for Carlos Beltran following Beltran’s fourth-inning single, stole second and went to third on a ground out by Joey Votto.

But he was stranded when the Mets’ David Wright grounded out to end the inning.

The NL’s lone other serious threat occurred in the seventh, when Wright singled with one out off Greg Holland. But Blue Jays Brett Cecil and Steve Delabar struck out Dominic Brown and Buster Posey to end the inning.

The American League added an insurance run in the eighth, when Perez and Jhonny Peralta singled. Perez went to third on Torii Hunter’s double play grounder and scored on Jason Kipnis’ double to left.

Seaver achieves goal

Tom Seaver had a simple goal for Tuesday night’s ceremonial first pitch before the All-Star Game: “I just wanted it to go in the air,” he said. “That’s all.”

Mission accomplished.

After some pre-pitch theatrics that involved a mock windup from the rubber, Seaver moved up on the mound and tossed the ball straight but short. Catcher David Wright stepped up to intercept it.

“Wright saved me. He caught it when it was in the air,” Seaver told a small group of reporters after a quick change out of his National League jersey and into a butterfly-patterned shirt.

(On Fox, he graded himself: “I would be no prospect whatsoever. Prospect too old and no life on his fastball.”)

Seaver said he had been practicing at his California vineyard. “I was trying not to embarrass myself,” he said.

That would have been difficult in any case before an adoring crowd at Citi Field that greeted the franchise’s best player with a warm ovation.

The moment had added poignancy because Seaver, 68, has been recovering from Lyme disease, a condition that a year ago was affecting his speech and memory and had many in the Mets’ organization concerned for his health.

“I’m getting better,” he said. “It’s not life-threatening. Well, it is life-threatening if you pass out and you go into a truck or whatever. But a year ago I had Lyme disease. I’ve been fighting it. I’m going great.”

Seaver pronounced himself “duly impressed” with Matt Harvey, who joined Seaver and Dwight Gooden as All-Star Game starters as Mets.

“I’ve never talked to him,” Seaver said. “It would be interesting to talk to him and see what the mind-set is like. The numbers are good.”

Seaver said he rarely watches games on television but is a “voracious boxscore reader” who has noted the paucity of complete games and loathes how important a statistic innings pitched has become — for Harvey and others.

“I just disagree with some computer running the numbers and then applying it to these people,” he said.

The last time the Mets hosted a Midsummer Classic, in 1964, Seaver was pitching for the Alaska Goldpanners of Fairbanks in a summer league for collegians.

So what did he think of the experience in Queens?

“You know what was the most enjoyable for me?” he said. “It was watching the players coming out, because it brought so many wonderful memories and excitement for the game that I love. Seeing their game faces start to come on and the pride they have in the National League, I probably enjoyed that more than anything out there.”