PITTSBURGH — Kyle Hendricks pitched effectively into the seventh inning, Nico Hoerner homered, tripled and drove in three runs and the Cubs beat the Pittsburgh Pirates 8-3 on Wednesday to complete a three-game sweep.

Hendricks (3-2) won his third consecutive start for the Cubs, who have won eight of nine to give them some serious momentum heading into a weekend series against rival St. Louis in London, England, starting on Saturday.

Hendricks allowed three runs — one earned — and two hits in 6 1/3 innings with three walks and two strikeouts.

Hoerner hit a two-run triple off Rich Hill (6-7) in the third and added a solo home run in the seventh. Ian Happ doubled twice and drove in two runs. Happ, a Pittsburgh native, has reached base safely in each of his past 37 games against the Pirates, a stretch in which he is hitting .352 (49 of 139) with 15 doubles and 28 RBIs.

Happ broke the game open when he laced a double to left field with two outs in the sixth, a rally that started with a rare error by Pittsburgh third baseman Ke’Bryan Hayes. Hill hit Trey Mancini with an 0-2 curveball and Happ followed with a shot to the corner that made it 5-1.

Josh Palacios had an RBI double in the second to end a 25-inning scoreless drought for the Pirates. Pittsburgh scored two runs in the seventh on a throwing error by Cubs first baseman Trey Mancini to get within 6-3 but could draw no closer.

The Pirates have dropped nine straight, their longest losing streak since a nine-game slide from June 6-16, 2021. The franchise was in full-on rebuilding mode then. Pittsburgh believes it is drawing closer to becoming a contender but the good vibes that came with a promising 19-9 start have faded over the past two weeks. The Psirates are 15-30 over their past 45 games.

While Hill wasn’t particularly sharp — giving up four runs, three earned with two walks and four strikeouts in 5 2/3 innings — Pittsburgh’s most pressing issue is an offense that has essentially vanished.

The Pirates were shut out on Monday and Tuesday and have scored just 20 runs since the skid started with a loss to the Cubs at Wrigley Field on June 13.

Chicago, by contrast, scored 20 runs in less than 48 hours at PNC Park.

Dansby Swanson (wrist) was held out of the lineup as a precaution, though Swanson is expected to be available in London.

Swanson was hit by a pitch in Tuesday night’s win but remained in the game.