Stephen Strasburg strikes out nine and walks none in the win. (Katherine Frey/The Washington Post)

The Washington Nationals have searched all season for an offensive pulse, never more desperately than Sunday afternoon. Cole Hamels of the Philadelphia Phillies had oppressed the Nationals all game, placing them on the brink of wasting Stephen Strasburg’s menacing brilliance — maybe the best performance of his career, one teammate said later. Finally, they found a spark in an unlikely hiding spot: a 65-foot groundball from a backup catcher who started the season at Class AAA.

All customary measures have failed the Nationals’ offense this season, and so the offbeat rally that lifted them to a 6-1 victory at Nationals Park provided the perfect antidote. Manager Davey Johnson had tried everything, up to and including letting his gray stubble spread, to shake the cobwebs off his team’s bats. Nothing worked until Jhonatan Solano dribbled a bases-loaded grounder in the seventh, two runs scored, the floodgates opened and Hamels melted down.

“All you need is that little break,” shortstop Ian Desmond said. “We’ve been waiting for that.”

The Nationals scored five runs in the seventh as they batted around for the first time all year, ensuring they would not squander one of the most dominating days of Strasburg’s career. He struck out nine, walked none and allowed five hits in eight innings. The only run he allowed scored on the first balk of his career, in the eighth inning when the Nationals were leading by five runs, anyway. For good measure, Strasburg added a double and a single in three at-bats.

“It’s all about getting a rhythm, getting comfortable,” Strasburg said. “When I get comfortable out there and I’m feeling my mechanics pretty well, I just let it eat. . . . Just commanding my pitches. Sometimes, you’re going to get in a groove to where you can hit the glove wherever it is.”

After Hamels’s single in the third, Strasburg took apart the Phillies. He retired 14 of the next 15 batters he faced. The hitter who reached, Freddy Galvis, was also the only batter in the stretch to hit a ball out of the infield. He flared a single to center field, and two pitches later, Michael Young rolled into a 4-6-3 double play. In his last three starts, Strasburg has allowed three earned runs in 23 innings.

“He just went after guys,” second baseman Steve Lombardozzi said. “He was working quick. It was fun to play behind him. He was attacking hitters.”

Strasburg operated at full capacity. He turned his focus in recent starts to the command of his fastball. With improved control and more first-pitch strikes, Strasburg enabled himself to tap into his complete arsenal. He froze hitters with 97-mph fastballs on the black, fooled them with a boomerang curveball and overwhelmed them with his high-80s change-up, which dived like a busted toy plane.

When he took the mound 15 days earlier in San Diego, Strasburg had never thrown a pitch in the eighth inning. Now, he has twice completed eight innings in three starts.

“This is probably the best we’ve seen him, the last two starts, since he’s been here in the big leagues,” Desmond said. “He’s starting to figure it out on another level.”

For six innings, in their first meeting, Strasburg and Hamels, two San Diego natives, matched zeros. Entering the bottom of the seventh, the two pitchers accounted for half the game’s hits. Ryan Zimmerman led off by dribbling a soft grounder to second. Galvis, perhaps unnecessarily, tried to flip the ball with his glove, pulling first baseman Laynce Nix off the bag and giving Zimmerman a single. Later, Zimmerman showed Nationals teammates his chipped end of the bat.

“It was mashed in where he crushed that ball to second,” Johnson said, grinning. “Those things, that’s called momentum. Once you start a little momentum going your way, that’s what you need.”

Adam LaRoche followed with another single to right field. Desmond walked to the plate, and Johnson called for a sacrifice bunt – even if it meant one of the Nationals’ best sluggers would cede to Tyler Moore, batting .139 coming in, and Solano, in the majors only because Wilson Ramos is on the disabled list.

“We weren’t doing too good playing it safe,” Johnson said.

It was more than a hunch. Desmond entered Sunday hitting .200 against left-handed pitchers. Johnson also believed the Nationals would need just one run with Strasburg on the mound.

“You have to trust the guy behind you,” Desmond said.

Desmond dropped down the bunt, putting two runners in scoring position with one out. Hamels intentionally walked Moore in order to set up the double play. Solano took a vicious swing on a 1-2 fastball, and it trickled toward Young, the Phillies third baseman who had started the play on the grass.

Zimmerman rumbled down the line. Young scooped the ball and fired low to catcher Humberto Quintero. Zimmerman slid hard into Quintero’s shins, meeting the ball.

“I knew it was going to be close,” Zimmerman said. “I wasn’t trying to break up anything. I was just trying to get to home as fast as I could.”

The ball squirted between Quintero’s legs and rolled toward the Nationals’ dugout. LaRoche sprinted around third and scored, too, putting the Nationals ahead 2-0.

“A couple weeks ago, they probably would have turned a double play on that swinging bunt by Solano,” Desmond said. “Things are starting to unfold. We’re starting to play the game better. We have to play good, crisp baseball to put pressure on other teams. When you do that, things like that happen.”

The Nationals could relax, and it showed in their aggressive swings. Lombardozzi flicked a double to right field. Two more runs scored, and Lombardozzi advanced to third when Delmon Young, in his latest misadventure, couldn’t corral the ball. When Denard Span doubled and Bryce Harper drew a walk, the Nationals had sent their whole lineup to the plate.

Afterward, Johnson asked a group of players if he could shave his scraggly beard, which he vowed to keep until the Nationals’ offense picked up.

“No,” left-hander Gio Gonzalez piped up. “It’s not shaggy enough.”