With two outs in the eighth inning, Bryce Harper stepped up to the plate. It was a pivotal moment in the Phillies’ eventual 9-7 win Sunday over the Los Angeles Angels at Citizens Bank Park. The bases were loaded, the Phillies were down 6-2, and Harper had a chance to tie it up.

This is not a team that has excelled with runners in scoring position. But as Harper battled his way through an at-bat with Angels reliever Raisel Iglesias, a grand slam felt like an inevitability. And on the seventh pitch, a changeup right in the middle of the plate, Harper delivered, crushing a ball 426 feet to the second deck of the right-field stands for his 13th moonshot of the season.

» READ MORE: Phillies interim manager Rob Thomson has a fan in Mets manager Buck Showalter

Harper threw his fist in the air. As he skipped to first base, he let out a yell and motioned to his teammates in the dugout. On his way to second base, he threw his fist in the air again. It almost seemed to be a cathartic moment; for weeks, the Phillies have hit balls that seemed like sure home runs that have fallen just short. They’ve lost extra-inning games. They’ve been able to start rallies but have had trouble completing them.

But in this moment, things went right. Harper’s ball wasn’t caught for an out — it landed in the seats. Even when Phillies closer Corey Knebel allowed an go-ahead RBI single to Matt Duffy in the top of the ninth, it felt like the chips were going to fall the Phillies’ way. And they did.

In the bottom of the ninth, Alec Bohm reached on a one-out single. One out later, Didi Gregorius, fresh off of a rehab assignment, kept the game alive with another single to put runners on first and second.

Bryson Stott stepped up to the plate. Harper saw Zack Wheeler watching from the dugout steps. “He’s about to go deep right here,” Harper said. “I can feel it.”

Stott had a terrific at-bat, and on a 3-2 count, proved Harper’s prediction correct, hitting a three-run walk-off homer to right field to give his team its fourth straight win.

“I’m so happy for the kid, man,” said Harper, who like Stott hails from Las Vegas. “What an at-bat. What a situation for him. Being able to put our trust in our young guys the last couple days, and really let them just play … it’s been great. And it paid off today.”

Bohm breaks hitless streak

After going 0-for-4 with two strikeouts on Saturday, and smashing a bat rack in frustration, Bohm had a better game on Sunday. He went 3-for-4 with a walk, and made a nice defensive play in the eighth to save a run.

“It was good to see him get some hits,” said interim manager Rob Thomson. “Kind of like the weight of the world is off his shoudlers now and he can breathe a little bit. He can hit. And everybody goes through a time during the year when you’re hitting balls hard right at them and it might turn into a confidence thing and go into a little bit of a slump, but it looks like he’s turning a corner.”

Return of the infield blunders

For the most part, the Phillies’ infield has looked more solid defensively than it has in recent seasons, thanks to infield coach Bobby Dickerson, but Sunday was an ugly day. They committed two errors: a throwing error by first baseman Rhys Hoskins in the fourth inning and a fielding error by shortstop Stott. Stott’s error was particularly frustrating, because it was coming off of a fantastic play in the previous at-bat. On that play, Stott moved to his right to nab a hard-hit Mike Trout grounder and threw Trout out. On the next play, he allowed a ground ball through his legs. Baseball can be cruel.

Kyle Gibson cruises, then hits a snag

Kyle Gibson has had a strong 2022 season, but for whatever reason, he has struggled to get past the fourth inning. Over 10 outings, he has an 8.38 ERA in the fourth inning. Batters hit him .188 the first through the order, and .356 the second time through.

“I’ve looked at that a lot, actually,” Gibson said of his struggles in the fourth inning. “The last two starts I was able to kick that a little bit and put up zeroes and today some of the pitches were executed well and some of them weren’t. We looked at pitch usage, pitch execution, and sometimes it doesn’t work out. And every now and then you get away with bad pitches, and today I didn’t get away with anything.

“Had the walk to Trout which was close but it didn’t go my way. But I’ve just got to keep making pitches. And my job there is to get outs. In that instance, I wasn’t able to get the outs that I needed.”

Those struggles re-emerged on Sunday. Gibson cruised through his first three innings, allowing just a walk and a single. In the fourth inning, he quickly allowed two hits and a walk to the load the bases for Jared Walsh, who drove in a run with a single. The Angels piled on four more runs, and Gibson exited the game without recording an out.

He entered Sunday’s game with a 3.83 ERA and exited with a 4.40 ERA.

Phillies’ plate discipline seems to be improving — with one glaring exception

The Phillies drew 16 walks through their three-game series with the Angels, an indication that perhaps they are the seeing the ball better than they had been. There is still work to be done. According to Fangraphs, entering Sunday the Phillies had four hitters with at least 90 plate appearances who are swinging at pitches outside of the zone at a rate above league average (37.2%): Odúbel Herrera (42.9%), Nick Castellanos (42.0%), Harper (40.7%) and Jean Segura (37.3%).

Earlier this season, Herrera swung at a pitch that went between his legs. A few games later, he swung at a pitch in the dirt. On Sunday, in the bottom of the fourth inning with two strikes, he swung at a pitch that landed almost exactly where a pitch earlier in the at-bat had been called a ball. Herrera did draw a walk in his next at-bat, but the pitches were so far out of the zone that it would have been egregious for Herrera not to have drawn a walk.

Herrera said earlier in the season that plate discipline is something he’s been working on with his hitting coach, but the Phillies have yet to see big results from that work.

“There are going to be days that I’m going to swing at bad pitches, I’m not perfect,” Herrera said through a translator in late May. “But I’m working at it and I’m trying to get better.”