San Diego, CA (SportsNetwork.com) - James Shields struck out 11 batters and the San Diego Padres took advantage of three Chicago defensive mistakes in their 4-3 win over the Cubs on Tuesday.

Shields gave up a pair of solo home runs among the six hits that he scattered over seven innings for the Padres, who snapped a three-game losing skid. Shields has given up at least one home run in eight of nine starts this season and leads the majors in homers allowed.

"He pitched great. His stuff was good," said Padres manager Bud Black. "11 strikeouts tonight. Nice mix of pitches, spotting the ball."

Chris Coghlan and Dexter Fowler went deep off Shields in the third inning to give the Cubs an early 2-0 lead.

Jason Hammel tossed a gem for Chicago but was betrayed by his defense. He struck out eight in seven innings, yielding just three hits and two unearned runs.

"Jason could not have pitched better than he did tonight. It's impossible," said Cubs manager Joe Maddon. "He was outstanding. He kept getting better. He kept making pitches."

Hammel did not allow a baserunner until Justin Upton reached second on Kris Bryant's throwing error to start the fifth inning. The error immediately came back to bite the Cubs, as Yangervis Solarte plated Upton with an RBI single the very next batter.

Another error two innings later led to San Diego's second run. Matt Kemp was safe at first on Starlin Castro's error to start the seventh. He was then replaced on first by Solarte, who grounded into a fielder's choice. Solarte took second on a wild pitch and Will Venable cracked an RBI single to center.

Pinch-hitter Clint Barmes popped up against James Russell (0-1) to lead off the eighth inning, but the easily playable ball dropped next to Addison Russell. Abraham Almonte, also pinch-hitting, bunted for a single and two batters later, after Pedro Strop came on to pitch, Derek Norris ripped a double down the left field line to plate both runners.

Coghlan hit his second solo homer of the night with two outs in the ninth off Craig Kimbrel, who responded by getting Mike Baxter to bounce out to shortstop.

Joaquin Benoit (4-1) picked up the win for a clean eighth inning and Kimbrel recorded his 11th save.

Game Notes

The Cubs acquired pitcher Yoervis Medina from the Seattle Mariners on Tuesday in exchange for catcher Welington Castillo. Medina was assigned to Triple-A Iowa ... The Cubs have dropped two straight on the heels of a six-game win streak ... Castro's error was his seventh of the season, while Bryant and Russell, each of whom started the season in the minors, committed their fifth.