It was only a matter of time.

It had been a tough start to the season’s first homestand. The offense was scuffling. The starting pitching had been uneven.

Citizens Bank Park was going to get rocking at some point. Andrew Painter gave the home crowd a real taste of excitement during his debut Tuesday night. It almost felt like a precursor.

The Phillies broke through again in their 6-5 walk-off win over the Nationals on Wednesday afternoon. The ballpark felt alive.

Through the first six innings, the offense looked stuck again. Cristopher Sánchez gave them five and a third innings and allowed just one run, but the Phillies scratched across only one run of their own and spent most of the afternoon searching for support and, more importantly, a big swing.

Then they found it.

In the seventh, J.T. Realmuto launched his first homer of the season.

In the eighth, Bryce Harper came up. He was 2-for-24 to that point and had shown only brief signs of breaking out of his slump. Then he got one. A solo homer that pulled the Phillies a little closer and gave the crowd more reason to believe.

Harper’s swing mattered for more than just the score. It was a huge homer for him and showed the group’s refusal to let the game get away.

“We’re never out of it, obviously,” Harper said. “We got a great group of guys in here.”

It’s not been the best start to the season for Bryce Harper, but he finally has his first home run of the year. Phillies still trail 5-3.

And in the ninth, the spark plugs took over and later finished the climb.

Down to their final strike, the Phillies got a huge swing from Edmundo Sosa, who had come off the bench earlier. He lined a game-tying two-run single off Nationals reliever Cole Henry that nearly sent the roof off the ballpark.

That is what Sosa does. He is a plug-and-play player, the kind of guy who comes off the bench cold and somehow still brings heat with him. He had entered earlier for the platoon advantage, and with the Phillies’ bench thinned out, Thomson turned to him again in the game’s biggest moment.

Sosa did not try to dress it up.

“I wanted to be aggressive during that at-bat,” he said. “I missed the first fastball. Then he came back with his best fastball, and he got me on that one too. I stepped out of the box and tried to calm myself down a little, just try to slow things down.”

Then he got dug back in with the crowd on their feet.

“I was just thinking about putting the ball in play,” Sosa said of his mindset.

Right there, it felt like the Phillies had shaken loose all the frustration that had followed them through the first week.

Sosa changes the pace of the game. He brings a sense of urgency to it. Sometimes that is a swing. Sometimes it is his glove.

How about both?

The game went to extras. Jhoan Duran came on, and Sosa made another impact play. With one out, he ranged up for a leaping grab and doubled the runner off second. He pumped his fist and yelled with excitement as he ran off the field.

Sosa said he knew immediately what that moment could mean.

“As soon as that happened for us, I knew that we were gonna go away with the win,” he said. “The stadium went crazy, and my teammates went crazy. That was a very emotional moment.”

From down 5-1, to tied at five in the ninth inning after Edmundo Sosa’s two-run base hit!

At that point, it felt like the Phillies were going to find a way.

Through the first week of the season, there had been few bright spots. But the youth infusion Rob Thomson talked about all winter stepped up when the Phillies needed it most.

Tuesday night, Painter. Wednesday afternoon, Crawford.

The Phillies’ 22-year-old center fielder stepped in with runners on the corners in the 10th and delivered. His first career three-hit day ended with a walk-off single, continuing what has already been an eye-opening start to his season.

Crawford is now batting .412. That is some first week for the rookie. And like Sosa, he did not overcomplicate the moment.

“Just staying within myself, trying to get a ball up and try to put a swing on it,” Crawford said.

That approach has already shown up all over his first week in the big leagues. He is tough to speed up, tough to defend, and tough to rattle. Crawford keeps putting the ball in play, keeps giving the Phillies something they have lacked at the bottom of the order for years, and now he has a walk-off to go with it.

“It’s definitely something I’ll remember for a very long time,” Crawford said.

He became the youngest Phillies rookie since Scott Rolen in 1997 to deliver a walk-off hit.

What also stood out was what the moment meant to him in the context of the bigger picture. This was not just his first walk-off hit. It was a game the Phillies badly needed before heading west after a rough opening homestand.

“It’s huge,” Crawford said. “Especially going on the road. It was good to be able to get one today and hopefully we’re just trying to build on that and get a few more on the road.”

The image of his teammates sprinting at him from the dugout gave the ending its own pulse.

“Special,” Crawford said. “Really cool to see how the boys had my back there and see them all running out. Just a really, really special moment.”

It was a storybook win for the Phillies’ young spark at the bottom and a fitting way to close a homestand that had taken the fan base through a few peaks and valleys.

With a travel day Thursday, the Phillies will open a six-game road trip against the Rockies on Friday.