PITTSBURGH -- Mike McKenry's first major league home run, a three-run shot in the eighth inning, lifted Pittsburgh to a 7-4 victory over the Cubs on Friday night and assured the Pirates of a winning record at the All-Star break for the first time in 19 years.
The rookie catcher's drive deep into the left-field bleachers came off Cubs closer Carlos Marmol, who blew his sixth save in 24 opportunities one batter earlier when he relieved Sean Marshall (5-3) and allowed Josh Harrison's game-tying single.
McKenry's blast drove the crowd of 37,140 into a frenzy. It was the Pirates' ninth sellout of the season as they continue to regain old fans and win new ones throughout the Pittsburgh area with their surprising season.
The Pirates are 46-42 with two games left against Chicago before the break. They have had 18 consecutive losing seasons, the longest such stretch of futility in major North American professional sports history.
Daniel McCutchen (3-1) got the final out of the eighth inning for the win and Joel Hanrahan got his 26th save.
Harrison, a rookie third baseman, had three hits for the Pirates, Andrew McCutchen homered, Neil Walker hit a two-run single and rookie left fielder Alex Presley and Lyle Overbay added two hits each.
Chicago's Aramis Ramirez hit his 10th home run in his past 16 games. Marlon Byrd had three hits, Alfonso Soriano doubled twice and drove in two runs and Ramirez and Darwin Barney added two hits apiece.
Barney put the Cubs ahead 4-3 with an RBI single off Jose Veras in the top of the eighth. That hit scored Byrd, who drew a one-out walk and advanced to third on Soriano's double.
In the bottom of the eighth, pinch hitter Matt Diaz worked a leadoff walk off Marshall and pinch runner Pedro Ciraco then slid hard into shortstop Starlin Castro to break up a potential inning-ending double play grounder by Walker. Overbay singled to put runners on first and second and Cubs manager Mike Quade called on Marmol.
Harrison hit a first-pitch single into center field to tie the game then McKenry hit his game-winning homer after fouling off four 0-2 pitches in a row.
The Cubs' Rodrigo Lopez allowed three runs and eight hits in six innings while walking one and striking out three.
Pittsburgh's James McDonald lasted 5 2/3 innings and gave up three runs and five hits with two walks and four strikeouts.
McCutchen homered to center field, his 13th, to lead off the bottom of the sixth and tie the game at 3-3.
Chicago had pulled ahead in the top of the inning on Soriano's two-run double with two outs off Chris Resop, who had relieved McDonald. The hit scored Ramirez, who was hit by a pitch, and Byrd who doubled.
The Cubs opened the scoring in the first inning on Ramirez's home run to right field, his 15th.
Pittsburgh answered with two runs in the third to take the lead as Walker's two-out infield single scored a pair of runs. Presley scored from third and Chase d'Arnaud came around from second when second baseman Barney's off-balance throw pulled first baseman Carlos Pena off the bag.