The Mets are accustomed to a man named Davis delivering, but he goes by J.D.

Here was Rajai Davis thrust into an important spot Saturday night: bases loaded, two outs in a scoreless game in the eighth inning with the Mets’ wild-card hopes in danger of slipping further.

The veteran outfielder emerged with the biggest hit of his Mets career, a bases-clearing double that accounted for the only runs in a 3-0 victory over the Dodgers at Citi Field. The win was the Mets’ fifth in six games and kept them three lengths behind the Cubs in the race for the NL’s second wild card.

“It’s always fun when you can get that big hit, especially when we can do it at home,” Davis said. “We can hear that roar. It’s always nice when you hear that roar.”

After Cy Young-award hopefuls Jacob deGrom and Hyun-Jin Ryu dueled for seven scoreless innings, the Mets scraped for their runs in the eighth against the Dodgers’ bullpen. Todd Frazier and Brandon Nimmo were both hit by pitches before Amed Rosario walked to load the bases.

Davis came to the plate as a pinch-hitter for Seth Lugo, who had entered the game in a double-switch earlier in the inning and struck out the side in the eighth. Davis fell behind 1-2 in the count to lefty Julio Urias before smashing a changeup to left for a three-run double. Davis, who spent most of the season at Triple-A Syracuse, was hitless in his previous 10 at-bats dating to Aug. 20.

“We talked about this last year with [Wilmer] Flores, and to me they have such short, simple swings,” manager Mickey Callaway said, also referring to Davis. “It’s a short, simple swing and he’s going to make contact. Almost every time we have used him to pinch hit this year, he’s hit the ball hard somewhere.”

Ryu retired the final 13 batters he faced over seven scoreless innings in which he allowed two hits and struck out six. Robinson Cano and Rosario singled in the second and third innings respectively, accounting for the Mets’ only offense against Ryu.

The reigning NL Cy Young winner gave the Mets seven shutout innings in which he allowed three hits and struck out eight over 101 pitches. Along the way his ERA dropped from 2.70 to 2.61.

“[Ryu] is having a great year, so I had a feeling it was probably going to be a pretty close game,” deGrom said. “I just wanted to give us a chance to win the game, and we did it.”

DeGrom retired 16 straight batters beginning in the second inning, a streak that ended with Corey Seager’s two-out single in the seventh. A.J. Pollock followed with a single, but after a visit from pitching coach Phil Regan, the right-hander struck out Gavin Lux to escape trouble.

“That seventh took a little bit out of me there,” deGrom said. “I had some stressful pitches in that inning, close ballgame, I had thrown 101 pitches and they kind of asked me and I said I was wearing down a little bit.”

For deGrom it was a second battle with a Cy Young candidate in less than two weeks. On Sept. 3 in Washington he and Max Scherzer each allowed four runs, but neither pitcher factored into the decision as the Mets bullpen surrendered six in the ninth in an 11-10 loss.

The series finale is Sunday night, when Walker Buehler is scheduled to face Zack Wheeler for a third straight highly regarded starting pitching matchup. Clayton Kershaw battled Noah Syndergaard on Friday, with the Dodgers rolling to a 9-2 victory.

This was another strong performance against the Mets for Ryu, who entered 4-1 with a 1.38 ERA in seven starts against them lifetime. Included was a 7 ²/₃-inning shutout against the Mets on May 30 at Dodger Stadium.

DeGrom’s only early challenge was the second inning, in which Cody Bellinger smacked a hard single leading off and Pollock was hit by a pitch. But deGrom rebounded to strike out Lux before Russell Martin was retired to end the inning.

Purchase event tickets to The Amazin’ 1969 New York Mets: A World Championship for the Ages presented by The Paley Center for Media and New York Post. Enter promo code: NYPOST to unlock tickets only available for Post readers.