SAN DIEGO — During a quiet moment in the middle of the madness, with the National League clubhouse bustling with activity, Mets manager Terry Collins was asked when he would begin having some fun.

“At about 5:15,” he said, quoting the local start time of Tuesday night’s the All-Star Game.

Yet, when the time came, a gorgeous midsummer evening had been transformed into a cold autumn night. The American League beat the National League, 4-2. And while it was the All-Star farewell of Red Sox star David Ortiz that provided the most lasting memory, it was the Royals who shaped the outcome, leaving Collins on the losing side.

Just as it was in October.

Eric Hosmer went 2-for-3 with a homer and two RBIs on the way to being named MVP, the first Royals player to earn the honor since Bo Jackson in 1989. Salvador Perez hit a two-run shot off former teammate and NL starter Johnny Cueto, giving the AL a 4-1 lead in the third and setting the tone for the evening.

“We said the same thing,” Collins said of fans having flashbacks. “I’m tired of seeing [expletive] Eric Hosmer getting a big hit. [expletive] sick of it.”

advertisement | advertise on newsday

Hosmer had a different reaction. “It’s a great feeling. It’s extremely humbling,” he said. “Honestly I was just so happy to be a part of all this and to be part of the team and make the All-Star Game for the first time. I never thought about becoming the MVP.”

Despite having Collins at the helm — a right earned when the Mets won the NL pennant — not one of his players appeared in the game.

With the NL trailing in the eighth inning, Collins went with Fernando Rodney and Kenley Jansen, leaving closer Jeurys Familia in the bullpen. Bartolo Colon, the only other active Met, was saved in case of extra innings that never came.

Yoenis Cespedes and Noah Syndergaard were replaced on the roster because of injuries.

“I’m not disappointed,” said Familia, who initially declined to discuss the situation. “We didn’t have the lead in the ninth.”

Baseball videos

Collins said he was somewhat disappointed that he left his own players on the bench. But in the case of Familia, the manager insisted that this season’s workload (43 appearances) played a factor.

“We’ve got to be careful,” Collins said.

The Yankees’ Dellin Betances tossed a scoreless seventh. Andrew Miller did not allow a run in two-thirds of an inning despite allowing two hits and a walk before he was relieved by Will Harris.

“I’d like to pitch better, but I’m glad Will came in and did the job,” Miller said.

Carlos Beltran went 0-for-1, joining David Cone as the only All-Star to represent both the Mets and the Yankees.

advertisement | advertise on newsday

However, the night belonged to Ortiz, who has proven himself to still be a threat at age 40.

During a pregame ceremony that featured the naming of the NL batting title after Padres legend Tony Gwynn, and an appearance set to his familiar Hell’s Bells by closer Trevor Hoffman, Ortiz received one of the warmest ovations.

Before the game, Marlins ace Jose Fernandez told ESPN that he intended to give Ortiz a sendoff by grooving three straight fastballs, even if it meant tossing them over at 90 mph “so there’s no chance that he fouls them or misses them.”

But when the moment of truth arrived, the righthander called an audible. Fernandez started Ortiz with a changeup, before throwing heaters that roared at 95 mph, none of them down Broadway as Adam Wainwright is widely believed to have done for Derek Jeter in the Yankee star’s last All-Star Game in 2014.

“We’re going to discuss that later,” Ortiz said, during a 20- minute media session in which he praised the game’s brightest young stars.

advertisement | advertise on newsday

Ortiz took a curveball for ball four, jogged to first base, then began his exit from the stage. When Edwin Encarnacion entered as a pinch runner, Ortiz raised his batting helmet to acknowledge the ovation.

The American League dugout emptied to greet him.

Former Met Daniel Murphy finished 2-for-3. But by the end of the night, the Mets were the only NL team not to have a player appear, even as Collins said he prioritized having every club represented.

Said Familia: “Maybe next year.”