PITTSBURGH (AP) -- The Pittsburgh Pirates are still providing plenty of surprises in their successful first half of the season.
Mike McKenry's first major league home run, a three-run shot in the eighth inning, rallied Pittsburgh to a 7-4 victory over the Chicago Cubs on Friday night and assured the surprising Pirates of a winning record at the All-Star break for the first time in 19 years.
The Pirates were 49-39 at the break in 1992 on their way to a third consecutive NL East title. They have had 18 consecutive losing seasons since, a record for major North American professional sports.
"I've learned from experience that you don't put expectations on people," Pirates manager Clint Hurdle said. "You draw up a plan and follow that plan. I don't what's going to happen from here on in. I'm not an expert. My job is just to get ready to play. Where that's going to take us, I don't know."
Where it has taken the Pirates so far is contention in the NL Central. They are in a second-place tie with the St. Louis Cardinals, one game behind the Milwaukee Brewers .
The Pirates have 10 players on the disabled list and started four rookies on Friday. Yet they won for the fifth time in six games thanks to McKenry, who is hitting .242 in 20 games.
McKenry was the backup catcher with the Boston Red Sox's Triple-A Pawtucket club when the Pirates acquired him in a trade last month. Yet he has settled in nicely as the starting catcher with Chris Snyder and Ryan Doumit on the DL.
"The thing about Mike is he comes to play," Hurdle said. "On the home run, he kept taking good pass after good pass after good pass. You go the feeling he was going to square a pitch up eventually."
McKenry tried to downplay the biggest moment of his young career.
"I don't know about being the hero," he said. "There were eight other innings where guys just battled their brains out."
The Pirates stayed hot before yet another large crowd as they continue to win back old fans and make new ones in a city that has waited a generation for a competitive baseball team.
Attendance was 37,140, the Pirates' ninth sellout of the season and fifth in their past seven dates at PNC Park.
"Anytime you have sellout crowds, it's usually an electric atmosphere," Hurdle said. "And the atmosphere has truly been electric in this ballpark. It's been great to see and be a part of it."
McHenry's drive deep into the left-field bleachers came one batter after Carlos Marmol suffered his sixth blown save in 24 opportunities when he relieved Sean Marshall (5-3) and allowed Josh Harrison 's game-tying single on the rookie third baseman's 24th birthday.
"It's a great birthday present," Harrison said with a smile.
Marmol wasn't celebrating, though.
"Today, I was throwing the ball right down the middle," he said. "That's what happens when I get hit. You're not going to be sharp every time you go out there. No excuses. I gave up two base hits and that's the ballgame."
Daniel McCutchen (3-1) got the final out of the eighth inning for the win and Joel Hanrahan got his 26th save.
Harrison had three of the Pirates' 12 hits, 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 in the top of the eighth.
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.
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 3-2 in the top of the inning on Soriano's two-run double.
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.
Notes: RHP Ryan Dempster will start Saturday night for the Cubs after getting through a pre-game workout without incident. Dempster was scratched from his start Monday night at Washington because of back pain. Chicago RHP Marcos Mateo underwent an MRI on Friday that revealed a forearm strain and he is expected to miss at least four weeks. He was placed on the DL on Tuesday. ... Hurdle said he had a 15-minute phone call with San Francisco manager Bruce Bochy on Friday to clear the air about Andrew McCutchen being left off the NL All-Star team. Hurdle had been quite vocal about McCutchen's exclusion from the squad that will be managed by Bochy in the All-Star game on Tuesday night at Phoenix. ... Chicago released Triple-A Iowa OF Fernando Perez , who was on its 40-man roster, after he hit .238 with three home runs, 20 RBIs and 17 stolen bases in 76 games.