ATLANTA — High-fives were in abundance for the Mets on Thursday, mostly from the relief of snapping a three-game losing streak.

But the fives that screamed the loudest were in the box score next to the names Pete Alonso and Amed Rosario. Five hits for Alonso. Five for Rosario.

They became the first teammates in Mets history to get five hits in the same game, leading a 10-8 victory over the Braves at SunTrust Park on a night Alonso tied another milestone.

“That’s nuts,” Alonso said, when told he and Rosario had earned a place in club history.

Almost as nuts as the notion the Mets would collect a season-high 23 hits, carry a six-run lead into the ninth inning and then have to hang on for the victory after Drew Gagnon surrendered homers to Ronald Acuna Jr., Freddie Freeman and Josh Donaldson. Edwin Diaz entered to record the final out, but not before Brian McCann had walked to bring the tying run to the plate.

Alonso slugged homer No. 39 — a three-run blast in the first inning against Julio Teheran — to tie Cody Bellinger’s National League rookie record set in 2017. The ball landed in a pond beyond the center-field fence and was retrieved by the Mets. A team equipment manager wanted to dry the ball before giving it to Alonso, but the rookie first baseman accepted it wet.

“I want it to be soaked,” Alonso said. “That’s how I know it’s mine.”

Rosario went 5-for-6 and finished a homer short of the cycle. The shortstop is 67-for-189 (.354) over his last 49 games after a mostly sluggish first half.

“I’m just extremely confident at the plate right now,” Rosario said.

Alonso finished 5-for-5 and joined Jeromy Burnitz (1993) and David Wright (2004) among Mets rookies to collects six RBIs in a game.

The breakout performance came a night after Alonso met with manager Mickey Callaway to voice his frustration that he wasn’t producing in big situations. This despite the fact Alonso had a .993 OPS in his previous 10 games.

“Nights like these you can kind of lean on when you have been frustrated a little bit at times,” Callaway said. “He’s a guy that is probably never going to be satisfied. I had this talk with him: Great people are rarely satisfied. No matter how many records they break they want more and I think Pete is that kind of guy.”

Teheran, who entered with a 2.68 ERA in 29 career appearances against the Mets, was knocked out in the second inning after allowing six earned runs on eight hits and three walks.

Alonso homered after Rosario had doubled leading off the game and Joe Panik singled him to third.

“I think all of us kind of fed off Amed today,” Alonso said. “He has been smoking hot this second half and the way he set the table was awesome. From the first pitch of the game he set the tone and if he doesn’t get five hits today I don’t know if we are as productive all the way through the lineup.”

The Mets kept going in a second inning in which Teheran recorded only one out. Marcus Stroman reached on an infield single and Rosario’s ensuing triple brought in the run. Teheran then walked Panik, Alonso and Michael Conforto to force in a run before Wilson Ramos’ RBI single gave the Mets a 6-0 lead.

Stroman earned his first win with the Mets by pitching 5 ¹/₃ innings in which he allowed three runs (one unearned) on four hits and four walks with five strikeouts. Matt Joyce and Josh Donaldson each homered against Stroman. The unearned run scored in the third, after Rosario’s throw broke the webbing on Alonso’s glove, allowing Ozzie Albies to reach first.

The victory moved the Mets (62-59) within two games of the NL’s second wild-card spot and gave the club momentum heading into a three-game series in Kansas City.

“We have got to keep it going,” Callaway said. “We haven’t done anything yet, we have put ourselves in a good position. We have to go into Kansas City guns a blazing and get after it.”