AP photo by Seth Wenig / New York Mets designated hitter Yoenis Céspedes, right, celebrates with Robinson Cano after hitting a home run during the seventh inning of Friday's season opener against the visiting Atlanta Braves. The Mets won 1-0.

NEW YORK — It sure didn't take much time for Yoenis Céspedes to swing right into a designated hitter's role in his long-awaited return.

Céspedes came back with a bang, immediately capitalizing on the new DH rule in the National League by launching a home run that sent Jacob deGrom and the New York Mets past the Atlanta Braves 1-0 in the season opener for the NL East Division rivals on Friday.

After five dominant innings from deGrom, who was popping the catcher's mitt with 99 mph fastballs at the start, Céspedes connected in the seventh off reliever Chris Martin (0-1) for his first long ball since his most recent Major League Baseball game on July 20, 2018.

"I don't care if he took a five-year hiatus, when he gets in the batter's box, you're worried," Braves manager Brian Snitker said. "He's such a presence."

The 34-year-old slugger missed most of the past two seasons with a string of leg injuries, requiring surgery on both heels, and then a broken ankle after a bad fall at his Florida ranch in a reported run-in with a wild boar.

Rules changes for this shortened season delayed by the coronavirus pandemic, provided a DH in NL games for the first time — giving the Mets a perfect slot for Céspedes even if left field presents a problem.

With no fans at Citi Field due to the pandemic, it was easy to hear teammates exclaiming in the dugout when Céspedes sent his drive soaring into the empty left-field seats.

"They erupted. They went crazy," rookie manager Luis Rojas said. "Obviously, it's a big moment for Cés. He's been waiting."

Seth Lugo (1-0) tossed two innings, pitching out of trouble in the seventh, and Justin Wilson whiffed Braves star Ronald Acuna Jr. with a runner in scoring position to end the eighth.

Edwin Díaz, who lost his job as closer during a miserable 2019 season, struck out two in a hitless ninth for the save. He worked around a one-out walk, giving the 38-year-old Rojas a victory in his debut.

After the game, he got a game ball from his players and a celebratory shower that Rojas said was beginning to make his uniform stink.

"I don't know what they threw on me, but they threw a lot of stuff," Rojas said.

Braves starter Mike Soroka, an All-Star last season who won his previous two matchups with deGrom, allowed four hits in six outstanding innings. He was aided by two terrific grabs from three-time Gold Glove center fielder Ender Inciarte, who robbed J.D. Davis of a potential two-run homer.

"He matched up with the game's best right there," Snitker said about Soroka. "It was pretty impressive on both sides."

Coming off consecutive Cy Young Awards, deGrom fanned eight and permitted only a broken-bat single and a walk. He was pulled after 72 pitches, having dealt with a back tightness scare early last week. The right-hander extended his scoreless streak to a career-best 28 innings dating to last season, the longest active streak in the majors.

"I've gotten used to watching him and feeding off the energy he brings to the mound," Soroka said. "He's been so good the last few years, and you just want to keep up."

Atlanta first baseman Freddie Freeman made his 10th straight opening day start after returning to camp a week ago from a frightening bout with COVID-19 that spiked his fever to 104.5 degrees.

Former St. Louis Cardinals outfielder Marcell Ozuna doubled and went 1-for-4 in his Braves debut.

Atlanta, the two-time reigning division champ, opened the 60-game season without its top two catchers, Tyler Flowers and Travis d'Arnaud, after both showed coronavirus symptoms and were placed on the injured list. Flowers and d'Arnaud have tested negative, Snitker said, but did not travel with the team.

The manager said he didn't know what the symptoms were and hoped the two just had "a bad cold." They will continue to be tested.

Alex Jackson and William Contreras were recalled to handle catching duties. Jackson batted ninth and struck out twice, falling to 0-for-15 in his big league career. Contreras made his MLB debut on defense in the eighth.

About 30 minutes before the first pitch, mascots Mr. Met and Mrs. Met strolled through the empty stands wearing makeshift masks and clapping and waving to nobody in particular. The cardboard cutout photos occupying some seats included one of former Braves star and Mets nemesis Chipper Jones, the National Baseball Hall of Famer.

The Mets improved to 39-20 in openers (despite losing their first eight in franchise history), the best opening day winning percentage in the majors. They've won 12 of their past 15 — and 23 of the past 26 at home.

Both teams wore Black Lives Matter T-shirts for batting practice and joined in holding a long, black ribbon on the field during a pregame message on the video board from many Black major leaguers about eradicating racial injustice.

The national anthem was performed virtually on the video board by essential workers, each singing their part, and New York Gov. Andrew Cuomo said "Let's play ball!" It appeared all players on the field stood for the anthem.