PITTSBURGH - Jeff Samardzija has struggled to earn victories over the past three months.
The Chicago Cubs have barely beat anyone on the road since the All-star break.
That didn't matter Saturday night when Samardzija pitched the Cubs' first complete game of the season in his final start of the year and Chicago beat the fading Pittsburgh Pirates for the second consecutive night, 4-3 on Saturday.
The Cubs arrived in Pittsburgh having lost 17 of their previous 18 road games; the only other time they won consecutive road games since June was July 23-24 in Pittsburgh.
Samardzija won for only the third time since the All-star break. Two of those victories have come against the Pirates.
"The guy over there, that's a special arm," Pirates manager Clint Hurdle said. "Tonight, we needed to find a way to dig one out of the dirt, and we weren't able to do that."
Today: Chicago Cubs at Pittsburgh Pirates, 1:35
Pitchers: Cubs LHP Chris Russin (0-2) vs. Pirates LHP Jeff Locke (0-1)
Pedro Alvarez had two hits and two RBIs for the Pirates, who have lost six of eight and were passed by Los Angeles for third place in the NL wild card standings.
Pittsburgh staked starter James McDonald out to a 2-0 first-inning lead but couldn't add any more while he was in the game. McDonald allowed three runs and seven hits in 5 2-3 innings.
"As long as I keep my team in the game, it's a decent outing for me," McDonald said.
David DeJesus singled off Jason Grilli (1-5) with two outs in the eighth, driving in Welington Castillo for the go-ahead run after Pittsburgh had tied the game at 3 in the bottom of the seventh.
Samardzija (9-13) overcame a rocky first inning to allow two hits over his final 8 2-3 innings. With the 27-year-old in his first full season as a major league starter, the Cubs will shut him down for the season.
"That was a heck of a way to go out, no doubt about it," Cubs manager Dale Sveum said.
Batting in the No. 9 spot in the order, Chicago's Tony Campana had two hits and scored two runs. The Cubs' Alfonso Soriano led off the second with his 27th home run.
Samardzija had nine strikeouts, allowing four hits, one walk and two earned runs in his first career complete game. He threw a season-high 120 pitches.
Samardzija completes his season by pitching 174 2-3 innings - five more than he pitched over the course of his first four seasons in the majors combined.
He was not sharp to start the game, allowing a single to Brock Holt, hitting Andrew McCutchen and walking Garrett Jones before Alvarez's single drove in Holt and McCutchen.
"I knew as long as I was showing them I was still strong and still throwing strikes, they'd let me go," Samardzija said. "Obviously, a one-run game, it's tighter and I couldn't let anyone get on. I just wanted to make my pitches and I felt good. It went well."
Samardzija retired eight straight and 19 of 20 until Rod Barajas reached via a throwing error by shortstop Starlin Castro with two outs in the seventh and the Cubs leading 3-2.
Pinch-hitter Jeff Clement followed with a single off the wall in right, scoring pinch-runner Josh Harrison.
It was Clement's first hit in the majors since Aug. 14, 2010.
"That's a great story, him battling back and getting back to the big leagues and getting some at-bats now," Hurdle said.
Just as he said he would before the game, Sveum stuck with Samardzija - not only in facing Clement but in letting him hit the following inning with the go-ahead run on second and one out.
Samardzija grounded out, but Campana walked before DeJesus lined a single to right. Alex Presley's throw arrived at about the same time as Castillo, but Castillo's nifty slide eluded Michael McKenry's tag. Castillo had led off the eighth with a single.
Chicago got a run in the second, third and fifth innings.
Two days after the Cubs were involved in two dugout-clearing incidents against the Washington Nationals, home plate umpire Scott Berry warned both dugouts after McDonald hit Anthony Rizzo with a pitch in the third.
The Cubs' Steve Clevenger learned early Saturday he would be serving a one-game suspension for his role in Thursday's game.
Notes: According to STATS LLC., it was the seventh time in the majors this season a team hit the pitcher eighth. The Cubs had not batted a pitcher eighth since at least 1974 - the earliest such research is available. ... Castro was hit by a pitch in the hand in the ninth inning. He stayed in the game and X-rays taken after the game were negative. ... Cubs 2B Darwin Barney played his 124th consecutive errorless game at second base, setting an NL record. Barney's streak surpassed 1,000 innings Saturday. ... The Pirates announced their starters for their series in Cincinnati Monday-Wednesday: LHP Wandy Rodriguez, RHP Kevin Correia, RHP A.J. Burnett. ... Rookie LHPs start against each other in the series finale Sunday: The Cubs' Chris Rusin (0-2, 9.00) and Pittsburgh's Jeff Locke (0-1, 4.82).