Max Scherzer needed a sidekick. He had shut out the Arizona Diamondbacks for seven innings, giving the Washington Nationals seven chances to push across a run. But it wasn’t until the ninth, with the scoreboard spilling zeros, that Kyle Schwarber put the game on the barrel of his bat.

One swing turned Scherzer’s dominant effort into a 1-0 win for the Nationals on Friday night. One swing, remarkably, sent a baseball 463 feet and onto the concourse of the second deck in right field. And one swing — a swing that crushed Alex Young’s inside sinker for a walk-off homer — was a great way for Schwarber, the Nationals’ new left fielder, to meet the home crowd.

He hit 55 homers at Nationals Park during the Home Run Derby in 2018. None traveled this far.

“It was phenomenal,” Schwarber said. “That’s a moment I’m not going to forget. I’m super-pumped to be here.”

Schwarber was, in the end, a complement to Scherzer’s work. The ace allowed just two hits and two walks and struck out 10 across 106 pitches that saved a taxed bullpen.

On Monday, after Erick Fedde was hooked at 4⅔ innings, Kyle Finnegan, Tanner Rainey, Daniel Hudson and Brad Hand finished out a three-run win. On Tuesday, once Stephen Strasburg was pulled after four, Luis Avilán, Wander Suero, Austin Voth and infielder Hernán Pérez completed a 14-3 loss. And on Thursday, on the heels of a two-inning disaster for Patrick Corbin, Finnegan, Avilán, Suero, Hudson and Hand had to mop up.

Across Tuesday and Thursday, Avilán, a 31-year-old lefty, threw 77 pitches to record nine outs. So before Friday’s game, the Nationals (4-7) placed him on the 10-day injured list and recalled Kyle McGowin from their alternate site. They cited elbow inflammation as the cause.

But Washington was also just trying to stay afloat. Reliever Will Harris remains on the IL recovering from right hand inflammation. Jon Lester, their expected fourth starter, a 37-year-old working back because he was sidelined for either testing positive or being exposed to the coronavirus, logged 49 pitches in a simulated game Thursday. And both Corbin and Strasburg have really struggled.

“When you’re asking them to go out there every day in the fifth inning, the sixth inning, and cover all those innings, we got to be awfully careful,” Manager Dave Martinez said of the bullpen Friday. “Once our starting pitching starts pitching the way I know they’re capable of, which I really believe is going to happen soon, we’ll start consistently hitting, their timing will get a lot better, and you’ll start seeing us put strings of wins together.”

It may seem odd for Martinez to connect the rotation to his hitters’ timing at the plate. But the Nationals believe that everything — their offense, their bullpen, their record — stems from their starters. Their roster and payroll are structured accordingly. Sometimes, as shown in two losses this week, that can be a fragile formula. Other times, it is Scherzer’s turn.

The dominance was rooted in his change-up and four-seam fastball. By the seventh, once he had stranded a leadoff runner on first, Scherzer had gotten 10 whiffs and 12 called strikes with his heat. The whiffs grew to 13 by the end of his outing. That inning finished with him battling David Peralta for nine pitches (and ultimately inducing a routine flyball to Victor Robles in center). But the first five were efficient enough to keep him going.

“Fortunately, I was able to get away with something in the first to find a way to pitch deep into the game,” Scherzer said of an early mistake to Asdrúbal Cabrera, who popped up a low fastball and put the gem on track. “I had to pitch deep into the game with the way the bullpen was.”

The 36-year-old had struck out seven and retired 12 straight from the first to the fourth. After his fastball, the pitch he rode all night, he used 20 change-ups, 12 cutters, eight sliders and eight curves to handcuff the Diamondbacks (5-9). But the Nationals couldn’t touch 26-year-old righty Taylor Widener. Through six, as Scherzer was carving through Arizona’s order, Washington had only four hits and a handful of loud outs. Two players, Trea Turner and Josh Harrison, had advanced past first base. The Nationals hadn’t scored a run for Scherzer since Opening Day.

Scherzer, though, kept pushing. With back-to-back strikeouts to start the seventh, he tied and passed Cy Young on the career list. He sat 22nd with 2,807 since his debut with the Diamondbacks in 2008. And when he downed Carson Kelly with a slider, Scherzer had struck out the side and hit double digits for the 99th time in his career.

He hadn’t crossed 100 pitches since his final outing of 2020. So Hudson entered for the eighth and struck out two in a one-two-three inning. But the Nationals couldn’t score in the bottom half. So Hand entered for the ninth and left a runner glued to first. Then Schwarber crushed the walk-off to right, pushing his team into the win column.

“I’m sure the person who already got that ball probably took off with it and left,” Schwarber said with a laugh. “But I’m going to try to take something away from today’s game.”