SAN FRANCISCO (AP) — Ian Happ homered in the 10th inning, Nico Hoerner had three hits and also went deep, and the Chicago Cubs snapped a four-game skid with a 5-3 win over the San Francisco Giants on Thursday.

Happ homered to center off Luke Jackson (4-2) with automatic runner Cody Bellinger on base.

Héctor Neris (7-2) struck out two in a scoreless ninth inning for the win, and Porter Hodge worked around a first-and-second, no-outs jam in the 10th to complete his first save opportunity.

The Giants trailed 3-0 going into the sixth, when Jorge Soler’s two-out ground-rule double highlighted a three-run inning. San Francisco hadn’t advanced a runner past second before that.

Hoerner hit a two-run homer to left off Jordan Hicks in the third. The Cubs extended their lead later in the inning on Seiya Suzuki’s RBI triple.

Hicks gave up three runs in five innings in which he struck out seven and walked two.

Cubs starter Shota Imanaga bounced back from his worst outing, giving up three runs in six innings of five-hit ball.

The 30-year-old rookie from Japan, who signed a four-year, $53 million contract with the Cubs over the offseason, gave up 10 runs in three innings to the Mets on Friday in an 11-1 loss.

The Giants had a three-game win streak snapped. They were seeking their first four-game sweep of the Cubs since 2012.

TRAINER’S ROOM

Cubs: RHP Javier Assad (right forearm extensor strain) was placed on the injured list retroactive to June 24. … RHP Vinny Nittoli was signed to a major league contract and RHP Yency Almonte (right shoulder strain) was transferred to the 60-day IL.

Giants: 1B LaMonte Wade Jr. (left hamstring strain) is expected to be activated Friday, manager Bob Melvin said. … RHP Alex Cobb (left hip) and LHP Kyle Harrison (ankle) are scheduled to throw bullpen sessions on Friday, Melvin said.

UP NEXT

Cubs: RHP Jameson Taillon (4-3, 2.90 ERA) opens Friday’s series opener against Milwaukee. Taillon is 4-7 with a 3.20 ERA in 16 career appearances (15 starts) against the Brewers. RHP Colin Rea (6-2, 3.62) starts for Milwaukee.

Giants: RHP Logan Webb (6-6, 3.16) opens Friday’s series opener against the Dodgers. Webb is 4-6 with a 4.05 ERA in 14 starts against Los Angeles. RHP Landon Knack (1-1, 2.10) starts for the Dodgers.

___

AP MLB: https://apnews.com/hub/mlb

Brought to you by www.srnnews.com