CHICAGO — 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.

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 Jason Heyward — who led off with a walk against Sam Howard (2-2) and stole second — with the winning run.

“As a pinch hitter, you have to realize it's difficult and not put too much pressure on yourself,” Duffy said. “I try to tell myself it's like starting a game and I can get a hit in my first at-bat.”

“We got beat on a ball when Holmes executed a good pitch and Duffy hit the ball just out of (Adam) Frazier's range,” Pirates manager Derek Shelton said.

Ka'ai Tom hit his first big league homer and Frazier had three hits for Pittsburgh, which has dropped eight of nine. The Pirates have totalled 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 Heyward to line out and David Bote to fly out.

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

“I was just so excited; it's one of the best feelings in the world, hitting your first homer,” Tom said. “This is one of the most iconic ballparks in the game, so it's great to do it here.”

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

SMALL BALL

The Cubs are capable of slugging, but used speed and savvy baserunning to win on a chilly day with the wind blowing in. Heyward started the winning rally with a walk, stole second and scored on a short single — just beating the throw from right fielder Phillip Evans.

“You steal that base for a reason,” Heyward said. “I expect Duff to do what he does. I knew I had to make a great slide. The guy made a great throw.”

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 with a stiff back. ... 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 AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports