Austin Riley stepped up to the plate for his first at-bat on New York’s grand stage, and against Jacob deGrom no less. Four pitches later, he blasted a teed-up fastball to LaGuardia airport.

Riley’s two-run homer put the Braves up early in the second, staking a lead for their own evolving ace Mike Soroka. They defeated the Mets 6-2 in Friday’s series opener, ensuring at least a .500 record on their longest road trip of the season.

“It felt good,” Riley said. “The last four or five days for me had been a little scuffy, so I jumped on a fastball. I needed it.”

Riley’s 13th homer was a tone setter. It came off deGrom, who owned a career 1.88 ERA against the Braves in 19 starts entering Friday. The ball was plastered – at 98.4 mph, it was the fastest pitch deGrom has thrown that’s resulted in a home run.

Safe to call Riley’s New York initiation a success.

“That’s a good one for your book right there, when you get a guy like that,” manager Brian Snitker said. “That was a really good at-bat. He’s learning. He’s one of our young players who’s getting on-the-job training. The only way he’s going to learn is to get at-bats off the world’s best. And he is. He’s adjusting and adapting really, really well.”

The Braves were nursing a 3-2 lead in the eighth. Freddie Freeman and Nick Markakis singled. Riley was hit by a pitch to load the bases. On Robert Gsellman’s next pitch, Johan Camargo cleared the bases with a double to left-center for the final blow.

“It’s been big hit after big hit for him on this trip,” Snitker said. “Good for him. I’m happy for him too. It’s been a tough go for him after the year he had last year. To come in in this circumstance, you never know. He’s working. His attitude has been awesome. He’s been a great teammate. He’s dedicated to what he’s doing. It’s good to see him help out.”

Soroka held the Mets to one run – a solo shot by Pete Alonso – through six innings without walking a hitter. He wore down in the seventh, when the Mets had three hits in four at-bats, pulling within one and forcing Snitker into his bullpen.

Enter Anthony Swarzak. The ex-Mets reliever once again slithered out of a jam. After an infield single loaded the bases, he retired the Mets’ two best hitters. Jeff McNeil struck out and Alonso hit a hard-liner to Riley in left.

Swarzak’s unexplainable magic has made the Braves bullpen, statistically speaking, the league’s best since May 22. The right-hander has allowed one run and struck out 20 in 17-1/3 innings as a Brave.

“You don’t expect (him to put it together this quickly since being acquired),” Snitker said. “Hat’s off to him. He’s been fantastic here for us. Big, high-leverage innings. Big outs. I don’t make it easy for him sometimes when I bring him in either because I put his back to the wall. He’s responded every time.”

Across 14 starts, Soroka owns a 2.13 ERA, second best in the National League. He’s the Braves’ best shot at having a pitcher in this year’s All-Star game. The remaining roster spots will be announced Sunday night.

“It means a ton (to be in consideration for the All-Star game),” he said. “To look back at a few of these short starts, just to be able to think 12, 13 starts in now and it’s pretty crazy. I wouldn’t have expected this for myself. I wouldn’t have demanded this for myself. But it just goes into preparation for every game, getting out there and executing pitch-by-pitch.”

The Braves will try to take the series Saturday when Julio Teheran faces Steven Matz. The Braves are 5-3 against the Mets after going 13-6 against them last season.