CHICAGO (AP) — Anthony Rizzo, Joc Pederson and Nico Hoerner each had two hits and an RBI to help the Chicago Cubs beat the Philadelphia Phillies 8-3 on Wednesday night, ending an 11-game losing streak.

The Cubs raced to an early five-run lead off Wheeler and then added on to halt their longest skid since a 12-game slide in May 2012. Chicago had been winless since Zach Davies and three relievers combined to no-hit the Dodgers in Los Angeles on June 24.

Patrick Wisdom added a two-run double in Chicago’s three-run sixth inning after replacing third baseman Kris Bryant, who left in the fourth with right hamstring tightness.

Alec Mills (4-2) allowed three runs on five hits in 5 2/3 innings after Philadelphia clobbered Cubs pitchers for 28 runs in the first two games of the series.

Mills shut out the Phillies through the first five innings before Bryce Harper doubled in a run and Andrew McCutchen followed with a two-run drive in the sixth for his second homer in two nights.

Wheeler (6-5) yielded seven runs, four earned, on eight hits in 5 2/3 innings on a cool, drizzly night at Wrigley Field. The hard-throwing right-hander entered on a dominant run, having allowed no runs in his last two starts and just three in his last five — all in a game to Washington on June 22.

Chicago scored three unearned runs off Wheeler in the first on an error and soft four soft singles, including consecutive RBI bloops with two outs by Jason Heyward, Hoerner and Rafael Ortega.

Following a 12-minute rain delay, the Cubs upped their lead to 5-0 in the second. Rizzo’s triple to the right-field corner — the first hard hit off Wheeler — knocked in the first run.

After the Phillies cut it to 5-3 in the sixth, the Cubs replied with three runs in the bottom half on a single by Pederson and Wisdom’s double to the left field corner.