CHICAGO (AP) — Pinch-hitter Matt Duffy had a go-ahead single in the seventh inning, reliever Keegan Thompson pitched three scoreless innings for his first major league victory and the Chicago Cubs beat the Pittsburgh Pirates 3-2 Saturday for their fifth straight win.

Willson Contreras and Eric Sogard each drove in a run for Chicago, which has won seven of nine to improve to 17-16.

READ MORE: Pittsburgh Weather: Hot, Humid Conditions Continue

Thompson (1-0) allowed two hits and a walk following starter Trevor Williams, who gave up two runs and five hits in four innings. Andrew Chafin worked a scoreless eighth and Craig Kimbrel got the final three outs for his sixth save.

Duffy pinch hit for Thompson and blooped a two-out single to right off reliever Clay Holmes to score Heyward — who led off with a walk against Sam Howard (2-2) and stole second — with the winning run.

Ka’ai Tom hit his first big league homer and Adam Frazier had three hits for Pittsburgh, which has dropped eight of nine. The Pirates have totaled eight runs in their last six games. They are 2-17 in their last 19 games at Wrigley Field.

The Cubs jumped ahead 1-0 in the first when Contreras was hit by a pitch with the bases loaded and one out. Pittsburgh starter Wil Crowe (two runs, six hits in six innings) avoided further damage by getting Jason Heyward to line out and David Bote to fly out.

Tom’s two-run blast to the left-center bleachers in the fourth put the Pirates on top 2-1.

READ MORE: Police Investigating Two Overnight Hazelwood Shootings

Chicago tied it in the bottom half on a sacrifice fly by Sogard to drive in Contreras.

TRAINER’S ROOM

Pirates: 1B Colin Moran left in the bottom of the first with left groin discomfort. Moran, playing well behind the bag, caught a liner by Heyward and was injured when he ran and dived to first base trying to double off Contreras.

Cubs: SS Javier Báez left the game in a double switch after the seventh inning. … RHP Jake Arrieta (forearm strain) was scheduled to throw a bullpen Saturday. He’s not eligible to be activated from the 10-day IL until Thursday.

UP NEXT

Cubs righty Kyle Hendricks (2-3, 6.07 ERA) faces Pirates lefty Tyler Anderson (2-3, 3.24) in the finale of the three-game series on Sunday. Hendricks is coming off a seven-inning complete-game win over the Dodgers on Tuesday. Anderson already has lost twice to Chicago this season.

MORE NEWS: Department Of Defense To Conduct Planned Training Exercises In, Around Pittsburgh Area

(Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)