PITTSBURGH - Jeff Samardzija pitched the Cubs' first complete game in his final start of the season and Chicago beat the fading Pittsburgh Pirates 4-3 on Saturday night.
David DeJesus singled in Welington Castillo with two outs in the eighth 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 announced Friday their intention to shut him down for the season.
Batting in the No. 9 spot in the order, Chicago's Tony Campana had two hits and scored two runs. Alfonso Soriano hit his 27th home run for the Cubs, who arrived in Pittsburgh having lost 17 of their previous 18 road games but won for the second consecutive night.
Pedro Alvarez 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.
Samardzija had nine strikeouts, allowing four hits, one walk and two earned runs in his first career complete game.
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.
Before the game, Cubs manager Dale Sveum said he would be more likely to stick with Samardzija deeper in the game because there was no need to save him for a future start. Samardzija threw a season-high 120 pitches.