PHILADELPHIA (AP) — Bryce Harper knows Bryson Stott as well as anybody. So the Phillies star wasn’t surprised when a big swing by Stott completed Philadelphia’s thrilling comeback against slumping Mike Trout and the Los Angeles Angels.

Stott hit a game-winning, three-run homer with two outs in the ninth inning after Harper tied it with a grand slam in the eighth, and the Phillies rallied for a 9-7 victory Sunday that sent the Angels to their 11th straight defeat.

Harper and Stott are best friends who hang out on weekends and watch football together during the offseason in their Las Vegas hometown. Harper said Stott thrived in clutch moments growing up and predicted to teammate Zack Wheeler that the rookie infielder would win the game for the Phillies.

“I could feel it, just the moment, the opportunity,” Harper said. “What a moment for him, the fans, the organization, everybody. It was a huge opportunity for us to win a game today, and Bryson put us on his back that last inning and made it happen.”

It was the fourth victory in a row for the Phillies, who have won all three games under interim manager Rob Thomson since he took over when Joe Girardi was fired Friday. Philadelphia outscored the Angels 26-9 while sweeping the three-game series.

“This was a great series, but we have to keep going,” Harper said. “We have to keep building off this each day.”

Trout went 0 for 3 and is hitless in his last 26 at-bats, the longest drought of his decorated career. The three-time MVP did walk and score a run for the Angels, whose last win came on May 24.

“Things will start falling,” Trout said. “Had some good at-bats today, just try to take it into tomorrow. We’re in it, obviously, on a losing streak. But we’re not going to just come in here and put our heads down. We’re going to keep grinding. Everybody is in here fighting.”

A native of nearby Millville, New Jersey, the nine-time All-Star finished the series 0 for 11 with four strikeouts against his hometown team and is 2 for 20 with seven strikeouts in five career games in Philadelphia.

“It’s obviously good to be back,” Trout said. “I want another outcome, but it’s good to see some people I haven’t seen in a while.”

The Angels are on their longest losing streak since an 11-game slide in August 2016.

“It’s baseball,” Trout said. “There’s going to be some good times and there’s going to be some bad times. Right now it’s just a bad time.”

After blowing a 6-2 lead in the eighth, the Angels went ahead 7-6 in the ninth against Corey Knebel (2-4) when Matt Duffy made up for a costly error at third base with a two-out RBI single.

Singles by Alec Bohm and Didi Gregorius off Los Angeles closer Raisel Iglesias (1-4) put runners on first and second with two outs. Angels manager Joe Maddon, who summoned Iglesias with one out in the eighth, brought in Jimmy Herget to face Stott. The rookie connected on a full-count curveball clocked at 74 mph and sent the home team — and crowd — into a raucous celebration when he cleared the wall in right field.

“I knew I hit it good,” Stott said.

It was the second career homer for Stott, who also went deep in Philadelphia’s series-opening 10-0 win on Friday night.

Harper also doubled, Bohm had three singles and Nick Castellanos and J.T. Realmuto drove in runs for the Phillies.

Jared Walsh had two RBIs, and Jo Adell, Kurt Suzuki and Brandon Marsh also knocked in runs for Los Angeles.

The Angels appeared on their way to finally winning a game when they were ahead 6-2 entering the eighth.

Aaron Loup started the inning and allowed a leadoff single to Odubel Herrera that was followed by an error by Duffy, who threw the ball into the outfield while trying to get Herrera at second on Johan Camargo’s grounder. With the bases loaded, one out and the Angels still ahead by four, Maddon brought in Iglesias to attempt a five-out save.

Iglesias, making his first appearance since May 27, struck out Rhys Hoskins and then had Harper in an 0-2 hole. But the reigning NL MVP worked the count back to 3-2 before launching an 89 mph pitch into the second deck in right field for his 13th homer of the season and sixth career slam.

“He’s got pretty funky stuff,” Harper said. “I was just trying to get something over the plate, stay through something and do a job.”

Phillies: After an off day, Philadelphia starts a three-game series at NL Central-leading Milwaukee on Tuesday night. Phillies LHP Ranger Suarez (4-3, 4.69 ERA) faces Brewers RHP Jason Alexander (0-0, 2.57).