SAN DIEGO -- Jeff Samardzija knew what Cubs manager Dale Sveum was doing by not visiting the mound in the eighth inning.
Sveum left Samardzija on his own when he wriggled out of two bases-loaded jams in the inning, and the Cubs beat the San Diego Padres 3-2 Saturday night.
"Me and Dale might have had a meeting if he would have taken me out right down there in the dugout," Samardzija joked. "But that's what Dale is all about. Dale is all about putting confidence in players. There are a lot of under the radar things he does that puts confidence in his players. He did it for me there, too. He didn't even have a mound visit or anything. As a player, that says a lot."
Said Sveum about his decision: "He bared down and got two huge outs. That's why you leave a guy like that in the game."
In his second straight solid outing, Samardzija (8-11) limited the damage to one run in the decisive eighth when the Padres twice loaded the bases and cut the lead to one run.
Darwin Barney homered and drove in two runs for Chicago, which broke a four-game losing streak. In the Cubs' last eight games, their only two wins have come in Samardzija's starts.
"Tip my hat to Barney, too, for giving me those two runs," Samardzija said. "When you have a two-run cushion instead of one, it helps."
Trailing 3-1 heading into the eighth inning, pinch-hitter Mark Kotsay led off with a walk and went to second on Will Venable's single. The Padres loaded the bases when Alexi Amarista's sacrifice bunt attempt hugged the third base line but stayed fair for a hit.
Yonder Alonso followed with a sacrifice fly. But Samardzija got rookie Jedd Gyorko on a fly out. After a passed ball, Samardzija intentionally walked Chase Headley to load the bases. He then struck out Logan Forsythe to end the inning.
"I thought from their standpoint, (Samardzija) is their guy," Padres manager Bud Black said. "He was throwing the ball well. He wobbled a little bit there but he hung in there and threw strikes."
Samardzija allowed two runs on seven hits. The right-hander struck out seven and walked two.
Samardzija threw a six-hitter in his last start, an 11-1 win over Washington last Sunday.
The light-hitting Barney, who had three hits, connected for a solo shot in the fifth inning and added a go-ahead RBI double in the Cubs' two-run seventh.
Barney, hitting .221, equaled his career high with his seventh homer and first since July 14.
Kevin Gregg pitched the ninth for his 26th save in 30 chances.
Eric Stults (8-11), winless in his last seven starts, gave up three runs on six hits in 6 1/3 innings. The lefty is 0-4 since his last win on July 14.
The Cubs went ahead 2-1 in the seventh after a leadoff walk to Darnell McDonald. With one out, Barney hit a ball into the left field corner. As McDonald rounded third, Forsythe took the relay throw on the grass just behind third base.
But Forsythe's throw sailed high into the stands behind home plate, allowing Barney to go to third. Anthony Rizzo followed with a two-out RBI single.
Barney homered with one out in the fifth inning, his seventh, to give the Cubs a 1-0 lead. The ball just barely cleared the left field wall, landing in the first row.
Venable tied the score 1-all with his 19th home run in the sixth. Venable, who extended his career high with his homer and had three hits, has hit safely in 19 of 20 games.
Fourteen of Venable's 19 homers have come at pitching friendly Petco Park. ... Stults was the first lefty starter the Cubs have faced in 16 games. ... Barney's home run was Chicago's 400th extra-base hit this season. The Cubs have 403, tops in the NL. ... Padres OF-1B Kyle Blanks, on the DL since July 12 with left Achilles inflammation, will play in a rehab game Sunday with Triple-A Tucson. ... Cubs C Welington Castillo (sore rib) missed his third straight start but is expected back in the lineup on Sunday. ... Cubs LHP Chris Rusin (2-3, 3.08 ERA) faces Padres righty Andrew Cashner (8-8, 3.74) in Sunday's finale.