It will be Pittsburgh's first trip to the post-season since Barry Bonds, Jim Leyland and Co. won three straight NL East titles from 1990-92. Bonds then left for San Francisco as a free agent, and the small-budget Pirates piled up 20 consecutive losing records — the longest streak in the four major professional sports.
"Even though I didn't lose for the last 20 years, they make you feel like you are. You feel like you lost those 20 years," Andrew McCutchen said. "That's all you hear. You hear it every single day — 'When's it going to change? You think this is the year?' You get sick and tired of hearing that. It's awesome that there won't be any questions anymore. The question is are we going to be able to go farther."
Starling Marte hit a tiebreaking homer in the ninth inning at Wrigley Field, and the Pirates threw out a runner at the plate for the final out.
The Pirates sprayed each other with champagne and beer and sparking cider in the visitors' clubhouse once St. Louis' 4-3 win over the Nationals became final.
The Cincinnati Reds also clinched at least a wild-card berth, when they beat the New York Mets 3-2 in 10 innings. The Pirates and Reds, both 90-67, trail St. Louis by two games in the NL Central with five to go.
Pittsburgh players sang Journey's "Don't Stop Believing." Players chanted "MVP! MVP!" while dousing McCutchen. They took pictures and manager Clint Hurdle had them gather for a group photo in the middle of the cramped visitors' clubhouse.
"The people of Pittsburgh have been waiting a long time," said Neil Walker, who homered.
The Pirates snapped a 1-all tie when Marte sent a drive off Kevin Gregg (2-6) with two outs in the ninth into the left field bleachers.
In a fitting coincidence, they preserved the victory on the final out in a play at the plate.
McCutchen, the centre fielder, picked up Ryan Sweeney's bloop single after the ball hit off right fielder Marlon Byrd's glove and threw to first baseman Justin Morneau, positioned just in front of home plate. Morneau made the relay to catcher Russell Martin, who applied the tag on Nate Schierholtz. Schierholtz had tried to score from first base.
Still on his knees, Martin held the ball over his head in jubilation.
The Pirates' last trip to the playoffs ended with Atlanta's Sid Bream sliding home with the winning run in the bottom of the ninth inning of Game 7 of the 1992 NL championship series.
Jason Grili grabbed Martin, having escaped with his 32nd save in 34 chances.
"Twenty-one years since we popped champagne in a Pirates — and we're acting like it's been a long time," Hurdle said. "The hard work, the fun. I'm just proud of each and every man in here, the fans they represent, ownership, general manager, president ... the scouts, players. This has been a group effort for a long time."
The Cubs tied it in the eighth off Mark Melancon (3-2).
Marte's 12th homer set off loud boos for Gregg (2-6), who was almost released last week after going on a rant to reporters when he thought he had lost the closer's job to Pedro Strop.
Walker homered against Jeff Samardzija in the first to give the Pirates a 1-0 lead, and Charlie Morton pitched three-hit ball over seven scoreless innings before the Cubs tied it against Melancon.
Brian Bogusevic led off the eighth with a single, his second hit, and moved up on a groundout by Darwin Barney. Then, after a wild pitch, he scored the tying run on a single by pinch-hitter Donnie Murphy.
That spoiled a terrific start for Morton, who struck out five and walked one.
Samardzija was almost as good, allowing one run and five hits over six innings. He struck out seven and walked four after going 0-1 with a 7.11 ERA in his previous four starts.
He pitched seven solid innings against Milwaukee last week but got into a disagreement with third base coach David Bell over defensive positioning in the dugout.
Samardzija's only blemish in this one came when Walker drove a 1-1 pitch out to left-centre with one out in the first.
With the long ball, Walker matched a career high of 14 set last season. He has four homers in the past five games.
Samardzija settled down after that but got little support as the Cubs lost for the 10th time in 13 games.
NOTES: Pirates manager Clint Hurdle said he hasn't set his rotation for the final series against Cincinnati, beyond A.J. Burnett starting on Friday. He would not say if struggling All-Star Jeff Locke will make his scheduled start on Saturday. The left-hander got roughed up by the Reds in Sunday's loss and is 2-5 with a 6.12 ERA since the All-Star break. "We are just having those conversations," Hurdle said when asked about Locke's status. ... Martin was in the Pirates' lineup after leaving Sunday's game with soreness in his left knee, an issue he's been dealing with since late July. Martin said he was feeling better and that the Pirates would "have to fight to try to get me out of the lineup." ... RHP Gerrit Cole (9-7, 3.23 ERA) starts Tuesday for Pittsburgh, with LHP Chris Rusin (2-5, 3.52) going for Chicago.