For the better part of two games Thursday, the Phillies bumbled and stumbled. They dropped the opener of a doubleheader, 3-1, fell behind by seven runs early in the finale, and looked nothing at all like the NL East title contender that players and management purport to be.

But the last thing they did before Friday’s 4 p.m. trade deadline was gather at home plate and pile on Brad Miller after his walkoff grand slam punctuated an improbable 11-8 victory over the Washington Nationals at Citizens Bank Park.

“Baseball,” Miller said, “just kind of kicks you in the [crotch].”

Well said.

The Phillies were shut down in first game by Max Scherzer in what likely was his final start for the Nationals. Zack Wheeler matched his ace counterpart for a while but gave up a two-run homer to Yan Gomes in the seventh inning.

» READ MORE: Phillies' Zach Eflin: ‘I don’t know if there’s a timetable’ for return from knee injury

Then, the Phillies fell behind 4-0 in the first inning of the second game, spot-starting rookie Cristopher Sanchez getting KO’d after recording only one out.

But it gets worse. Bryce Harper left with back spasms and Rhys Hoskins followed after tweaking his left groin. The everything-must-go Nationals, who traded closer Brad Hand earlier in the day, appeared to be on their way to a sweep, even as their front office was having discussions about dealing Scherzer.

“It’s a grind,” Miller said. “We’re baseball players. We always worry about the weather and stuff we can’t control. Is Scherzer pitching? Is he not? Max took the ball and dueled with our big guy. It was a hell of a pitcher’s duel. We have to run it back and just find a way. We got down early. I think we’ve shown the ability to come back.”

They chipped away on home runs by Hoskins, Andrew McCutchen, and Alec Bohm. Down to their last strike, they tied it on J.T. Realmuto’s two-run single through the left side. And they won it after pitcher Aaron Nola drew a walk to load the bases for Miller.

And so, the Phillies finished the day where they end most days: at .500. They are 51-51, the 21st time in 102 games that their record has been even. But they are also only 3 1/2 games behind the division-leading New York Mets and haven’t made the playoffs since 2011.

Now, president of baseball operations Dave Dombrowski must decide by 4 p.m. how aggressive to be about improving the roster.

The Phillies made a persuasive final case.

“It’s got to be smart, though,” Harper said. “We can’t just do it just to do it. We have so much faith in Dombo and what he does. We have so much faith in [general manager] Sam [Fuld] as well. They have been around the game for a long time. They know the players that we need. They understand our weaknesses and what we need to add.

“I’m looking forward to the next 24 hours seeing what type of team we’re going to be. We’ll see what happens. And if we’re that same team, then we’re going to battle and we’re going to grind each day.”

Nola at the bat

With Harper (back) and Rhys Hoskins (groin) out of the game and the Phillies out of bench players, Nola came up as a pinch-hitter in the eighth inning of the finale and worked a one-out walk to load the bases.

It marked Nola’s 19th walk in 295 career plate appearances. He’s a career .087 hitter with a .154 on-base percentage.

“Huge. Really huge,” Girardi said. “The opportunity to give us a chance just for a sac fly to keep the game going, his at-bat was huge.”

» READ MORE: Photos from the Phillies' Game 1 loss to the Nationals

Destructive defense

One thing Dombrowski won’t fix by Friday: the Phillies’ defense.

It has been a problem dating to last season and cost them again in the doubleheader. In the second game, Luke Williams booted Yadiel Hernandez’s bases-loaded double to center field, enabling a third run to score on the play. In the first game, Odúbel Herrera made a bad read and was unable to recover with a dive on Gerardo Parra’s leadoff double that preceded Gomes’ homer.

“We’re just not a real good defensive team,” Dombrowski said recently. “I don’t think there’s much we’re going to be able to do about that at this time of the year. I really don’t. We need to make the routine plays defensively and we need to hit. And when we don’t hit, the defensive shortcomings are going to show up.”

So long, Scherzer?

After giving up one run in six innings of the opener, Scherzer is 13-3 with a 2.42 ERA in 22 starts against the Phillies since he signed his seven-year, $210 million deal with the Nationals. And there have been some memorable duels.

In 2019, Scherzer blanked the Phillies for seven innings despite a broken nose suffered in a batting-practice bunt mishap. Last month, he feuded with Joe Girardi after the Phillies manager called for umpires to check him for a sticky substance. This time, he was pitching to punch his ticket to a contender two years after winning the World Series -- and starting Game 7 -- for Washington.

“I really look at it as a positive thing,” said Scherzer, a free agent at season’s end. “I signed a seven-year deal here to win a World Series. And we won. We won a World Series. That’s a lifelong dream come true.”