WASHINGTON — About 95 minutes before he threw his first pitch, as a Fourth of July crowd of 34,394 was starting to assemble outside the gates of Nationals Park and his teammates were participating in a hot dog eating competition, Jake Irvin walked onto the field seeking a moment of calm.

In bare feet, he strode across the clay-colored dirt and dry grass, took a deep breath and stepped atop the pitcher’s mound, which was still covered in a tarp. After staring in at an imaginary catcher, he pantomimed throwing a pitch, holding a cold water bottle in his left hand in place of a glove.

The right-hander then brought the same level of tranquility to a humid holiday morning matinee against the New York Mets, silencing one of baseball’s most potent offenses of the last month. Over eight scoreless innings, he struck out eight and surrendered just one hit and one walk in the Nationals’ 1-0 victory. Jesse Winker’s solo shot off Mets reliever Adrian Houser in the bottom of the eighth was the lone run of the game.

“That was unbelievable, really was,” Nationals manager Dave Martinez said of Irvin’s performance. “He was good all day, mixed his pitches up really well, but kept those guys off balance. Fastball was really good today. We definitely needed that. … It was fun to watch him.”

Irvin, 27, has just over a year of major league service time, but that makes him a veteran in a young and inexperienced Nationals rotation. Making one last case for a spot on the National League’s 12-man pitching staff in his final start before all-star rosters are announced Sunday, Irvin dominated the Mets, inducing 15 whiffs on 47 swings.

Irvin capped his longest outing of the season with a 1-2-3 eighth, striking out Tyrone Taylor on a four-seam fastball before releasing a roar that belied his previously calm demeanor following his 99th and final pitch. He then ceded to Derek Law, who rode into the top of the ninth in the team’s bullpen cart and carrying an American flag.

“It means a heck of a lot more on Fourth of July, I can tell you that,” Irvin said of completing eight innings. “Being able to pitch on this holiday, it’s something truly special to me, really near and dear to my heart.”

For the season, Irvin’s ERA now stands at 2.80, while his WHIP is at a tidy 1.00. Both are top-six marks in the National League.

Just as importantly for Washington, Irvin’s long outing helped preserve Washington’s overtaxed bullpen after Robert Garcia, Hunter Harvey and Kyle Finnegan had all been deployed on three consecutive days. In their stead, Law struck out two batters in the ninth for his first save of the season.