PHILADELPHIA — Washington Nationals starter Stephen Strasburg has opted to undergo surgery for thoracic outlet syndrome on Wednesday, ending his season after just five starts and 21⅔ innings. The hope is that Strasburg will return some time during spring training in 2022.

The news came a few hours before the Nationals beat the Philadelphia Phillies, 6-4, to snap a five-game losing streak. And it could only harden the team’s willingness to sell before Friday’s 4 p.m. trade deadline.

Strasburg, 33, has been unable to stay healthy since signing a seven-year, $245 million contract two winters ago. He logged five innings in 2020 before undergoing carpal tunnel surgery. He has already missed most of this season with two injuries: a strained right shoulder and nerve irritation in his neck, which led to a visit with Gregory Pearl in Dallas on Monday, which led Pearl to suggest surgery. Pearl, a vascular surgeon, also operated on Nationals reliever Will Harris in June.

But unlike Harris, who was dealing with blockage in an artery, Strasburg has a nerve issue he was trying to pitch through. Before the all-star break, he was even nearing a minor league rehab assignment, his bullpens yielding positive results. Then he felt more pain in his neck, slowing the recovery process. The rest unraveled from there.

“Stephen has worked to try to come back, and unfortunately, this is the step we have to take now,” Manager Dave Martinez said Tuesday afternoon at Citizens Bank Park. “Hopefully we get this fixed and he’ll be ready to come back and help us next year. I know he’s frustrated, as we all are, but sometimes things don’t work out like you want and we’ve got to move forward.”

“We all saw him out there playing long toss at 200 feet, he threw some really good bullpens, so we thought he was progressing,” Martinez continued. “And then he’d come back the next day, he was sore. We couldn’t figure it out, they’d work through it, he’d go back and again he got back on the mound and he’d get sore again. At some point, him and the medical staff had to decide that maybe he needs to go get looked at.”

Martinez expressed optimism about the problem being identified. But this surgery gives more reason to doubt whether Strasburg will ever regain the dominance that earned him his current contract. Or, for that matter, how the righty will look on the other side of another months-long rehab.

His 12-year career has been defined by frequent setbacks. In 2019, though, he thrived throughout the title run and was named the World Series MVP. When he opted out of his contract and became a free agent, the Nationals gave him the largest deal in franchise history. They built their next chapter around a rotation of Strasburg, Max Scherzer and Patrick Corbin. And almost two years later, Strasburg is hurt again, Corbin has a 5.71 ERA in 19 starts and Scherzer could very well be dealt before Friday’s trade deadline.

These Nationals, built with close to $200 million and the league’s most expensive pitching staff, are sellers ahead of Friday’s 4 p.m. cutoff. Strasburg’s repeated absences are a large reason why.

“For him to have all these issues, it’s frustrating for him, it’s frustrating for us. But one thing that I thought about last night is him and what he’s going through,” Martinez said. “And when he comes back, just trying to be as positive as I can with him and encourage him to just stay with it and try to get ready for spring training. Because he still has a lot of years here, and a healthy Strasburg can help us win a lot of games. So I’m really pushing for that. I’m hoping for that, and I know he feels the same way.”

As for the club’s immediate future, Scherzer is their most attractive trade candidate. Daniel Hudson, Brad Hand, Kyle Schwarber, Josh Harrison, Yan Gomes and Trea Turner are also in the mix, depending on how big the fire sale gets. Turner left Tuesday’s win after testing positive for the coronavirus. Scherzer was scratched Saturday with triceps discomfort, then threw his 40-pitch, between-starts bullpen session in Philadelphia on Tuesday. And because it went well, he’s still scheduled to start against the Phillies on Thursday.

But a looming trade could complicate those plans. When asked Tuesday if Scherzer will pitch again for Washington, Martinez straddled the line, saying yes before acknowledging that he told Paolo Espino to be ready. For more than six years, Scherzer has been a human metronome for this team, filling most turns and owning opponents, stomping all the while. Strasburg, by contrast, is the quiet star with ace potential, forever on the edge of going down.

Soon, it could be hard to swallow one arm leaving while the other’s in the shadows. It is a reminder that times do change.

“It’s going to be a slow progression to get him back, and hopefully he comes back,” Martinez said of Strasburg, who threw two bullpen sessions last week, testing his neck, arm and mechanics. “Right now, I’m saying that he’s going to help us in [2022] … that’s what I’ve got to believe.”

The Nationals pushed ahead Tuesday with three-run homers in the first and second inning. Josh Bell’s opposite-field shot scored Juan Soto and Turner, who went straight to the tunnel instead of celebrating with teammates, his positive test requiring immediate quarantine. Soto’s also flew the opposite way, and was also off Phillies starter Matt Moore, plating Victor Robles and Gerardo Parra.

Erick Fedde, Washington’s starter, was similarly prone to long balls. The Phillies went back-to-back in the fifth, with Bryce Harper lifting an inside-the-park homer off the center field wall, then Andrew McCutchen ripping a blast to left. Fedde yielded four runs on eight hits in 4⅔ innings. Robles left during an at-bat in the ninth inning after reaching for his lower back following a swing.

And this time, in a complete change of script, the bullpen was given a lead and held on. Martinez leaned on Sam Clay, Wander Suero, Kyle Finnegan and Brad Hand, despite his back-to-back blown saves. Hand even worked around Carter Kieboom’s throwing error to shut the door.