PITTSBURGH — Max Scherzer pitched Thursday night, and he wasn’t his dominant self, but what mattered most is that he was on the field at all. That was enough Aug. 22, on the doorstep of a high-pressure September, in Scherzer’s first start since July 25 and his second since the all-star break.

What happens next, following a 7-1 win over the Pittsburgh Pirates at PNC Park, is that the Nationals cross their fingers and hope. Hope Scherzer doesn’t feel any discomfort Friday morning. Hope that four innings and 71 pitches were just the right workload to ease their ace back into the pennant race. Hope this return sticks, unlike the last one, and Scherzer can get back to picking through lineups with everything he has.

“I feel pretty good. But like I said, this whole process of trying to learn what’s going on here, it’s the recovery,” Scherzer offered after the outing. “It’s more about tomorrow than it is today.”

Box score: Nationals 7, Pirates 1

The 35-year-old right-hander didn’t have his best command, allowing four hits, a run and a walk while striking out three. His fastball velocity sat between 94 and 96 mph. His short leash left five innings for the bullpen, and a combination of Wander Suero, Hunter Strickland, Fernando Rodney and Javy Guerra got through them. The offense scratched across two runs early and another five after Scherzer exited. Howie Kendrick provided insurance with a two-run homer in the eighth and finished with three RBI. Anthony Rendon added a solo homer in the ninth to give him a career-high 101 RBI.

That all helped the Nationals to a series win and, at 70-57, left them a season-best 13 games over .500. They also left Pittsburgh with their rotation back intact. But how Scherzer felt Thursday night — or how he pitched against a lowly offense — isn’t the critical part of this. It’s how his body responds, how it feels in the morning, how well he and the medical staff have decoded whatever led to three different diagnoses since late June. Then this start against the Pirates can be adequately assessed.

“Fortunately I’ve never been in this situation, but here I am,” said Scherzer, who added a single in two at-bats. “I got to deal with it. I have to understand what’s going on here, communicate with the trainers, doctors, understand what I can and can’t do.

“Try to communicate as much as I can and just make sure I can recover every single start.”

The Nationals have been anxious for Scherzer’s return and not just because he is one of the best pitchers on the planet. The past six weeks were uncharted territory as he dealt with a mid-back strain, then bursitis in the scapula below his right shoulder blade, then a mild rhomboid muscle strain in the same area. He had made at least 30 starts in the previous 10 seasons before this one. He broke his nose in June on a batting practice bunt and was back on the mound the next day. He prides himself on being durable, first and foremost, and filling each of his turns in the rotation.

So sitting out was, in a word, difficult. For both Scherzer and those around him. Scherzer often hung by Manager Dave Martinez in the dugout, making suggestions and hinting, not so subtly, that he was ready to pitch. He trash-talked the Nationals’ hitters. He started having pre-workout energy drinks before games — games he wasn’t playing in — for an added boost.

That’s how he coped. That’s Scherzer, always competing, always seeking an edge in whatever he does. Before he first felt upper-back pain in late June following a start in Detroit, he had a 0.95 ERA in his past nine appearances. That included 86 strikeouts against eight walks. He was at the forefront of the Cy Young conversation in the first days of summer, and there was only one way to slow him down.

The injuries did what opponents couldn’t. Washington worked him along slowly, not skipping any steps, getting even more cautious once Scherzer returned in late July, pitched five innings and felt something the next morning. He went back to the IL. The wait continued. The wait stretched 10 extra minutes for showers to pass over Pittsburgh on Thursday evening, and Scherzer soon emerged from the visitors’ dugout as a traveling crowd cheered. It came in part to see a resurrection of sorts. And the entire organization could exhale.

“It was awesome,” Martinez said. “Just seeing him run out there and take the ball was great.”

Scherzer had a two-run lead before he stepped on the mound after Trea Turner and Adam Eaton scored in the first. Turner reached on a double, his first of two in the game, and came home on a throwing error. Eaton reached with a bunt single and was plated once Kendrick chopped a grounder to third. Then Scherzer entered, had his sixth pitch lifted to the warning track by Adam Frazier, and spent the outing sidestepping damage.

The Pirates left two runners on in the second. In the third, Scherzer’s worst frame, he gave up a towering homer to Frazier before yielding a single and walk. He got out of that jam with a strikeout on a 95-mph fastball and then ended his night by getting Elias Diaz to whiff at a change-up to finish the fourth. Scherzer had a short conversation with Martinez, nodded a few times and proceeded to give swinging high-fives to his teammates.

If Scherzer feels good in the morning, he will begin further strengthening his shoulder in the weight room, preparing for a start Wednesday and working toward 100 pitches and “emptying the tank” in his final inning. Getting back on the mound in a live game checked one box. Now the Nationals will see whether Scherzer can check another.

“This is a good start,” Scherzer said. “But I’m not out of the woods.”