PITTSBURGH -- The Chicago Cubs clinched a playoff spot under rookie manager David Ross, returning to the postseason after a one-year absence despite losing to the Pittsburgh Pirates 3-2 Tuesday night on a walk-off home run by Jacob Stallings.
The NL Central-leading Cubs were assured a spot in the expanded playoff field when Philadelphia was swept in a doubleheader at Washington.
The Cubs began the day with a 4 1/2-game lead over St. Louis and Cincinnati in the division standings and a magic number of four to clinch the title. Chicago missed the playoffs last year for the first time since 2014.
"It's very rewarding for that group in there that they've put in a lot of hard work in a unique atmosphere that has presented a lot of challenges," said Ross, who took over for Joe Maddon this season. "Being away from their families, being tested, it would be really easy to get outside the rules, but they stayed accountable to one another. There's so much to be proud of from my point of view."
Chicago first baseman Anthony Rizzo also feels reaching the postseason in 2020 is a notable accomplishment.
"This isn't something we're going to take for granted because it's not easy," he said.
Stallings connected with one out in the ninth inning off Andrew Chafin (1-2) to help the Pirates end their five-game losing streak and win for the just second time in 15 games. It was Stallings' third home run of the season and the third game-ending hit of his career.
Chafin got the final out of the eighth and first of the ninth before Stallings sent a 2-2 pitch down the left field line and into the bleachers. The Pirates' shouts of joy echoed over throughout the empty ballpark.
Anthony Rizzo's two-run homer in the eighth inning had pulled the Cubs into a tie at 2-all.
"It was a cool moment that frankly I was never quite sure I'd ever do because I don't hit that many homers," Stallings said of his first walk-off homer. "I wish my son could have been there. He would have enjoyed the fireworks."
Stallings has been a bright spot for the Pirates, especially defensively as he rates high in many of the advanced metrics for catchers.
"He's done a nice job," Pirates manager Derek Shelton said. "Not only is he helping those pitchers grow, we're seeing him grow. There's a guy there that's an elite receiver, an elite thrower. A guy that in my mind should win the Gold Glove. We're seeing him turn into a leader."
Richard Rodriguez (3-2) pitched a scoreless ninth for the win.
Chicago's Jose Quintana was activated from the injured list and made his first start of the season. The left-hander went two innings and gave up one run and one hit with one strikeout.
Quintana had made just two relief appearances this year. He underwent surgery before the season to repair never damage in his left thumb and then was sidelined by a strained lat.
"It was good to be back and do my job," Quintana said. "Hopefully, I'll get more pitches the next time. I feel great. I could have kept going but I know where we're at right now with my first start back."
Down 2-0 with two outs and none on in the eighth, the Cubs' Willson Contreras singled off Chris Stratton. Left-hander Sam Howard relieved and Rizzo sent a 2-0 pitch into the right-field stands for his 10th homer of the season and first off a lefty.
Both teams had just five hits.
Pittsburgh starter Steven Brault pitched seven shutout innings. He threw a two-hitter to beat the Cardinals in his previous start last Thursday.
The Cubs were without a hit until Cameron Maybin singled with one out in the fifth, ending Brault's hitless innings streak at 10 games. Making his last start of the season, the left-hander finished the year with a 13-inning scoreless streak.
Brault struck out six, walked three and only got into one serious jam. He hit Contreras and Rizzo with consecutive pitches to begin the fourth inning but got Javier Baez to ground into a double play and struck out Kyle Schwarber.
Cubs: 3B Kris Bryant (right lower oblique tightness) sat out after leaving Monday's game. Ross is optimistic Bryant can avoid going on the IL. . To make room for Quintana on the roster, LHP Rex Brothers was optioned to the alternate site in South Bend, Indiana.
Cubs: RHP Kyle Hendricks (6-4, 2.93) will start Wednesday night in the third game of the four-game series. He has allowed just seven walks in 73 2/3 innings this season.
Pirates: RHP Trevor Williams (1-8, 6.70) has lost five straight decisions since getting his lone win Aug. 13 at Cincinnati.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Fuentes blows game open with 3-run homer vs. Mets
Josh Fuentes hits a ball deep over the wall in left for a Rockies' 3-run home run vs. the Mets.
Eaton robs Devers of a home run
Adam Eaton takes a shot to the ribs as he leaps into the air and hits the wall to make a grab in the outfield to rob Rafael Devers of a home run.
Alfaro helps Marlins rally in 9th, 10th to beat Giants 7-6
— Jorge Alfaro hit a game-ending, two-run double, and the Miami Marlins rallied from two-run deficits in the ninth and 10th innings to beat the San Francisco Giants 7-6 Saturday night.
Alfaro walks it off for Marlins vs. Giants in 10th
Alfaro walks it off for Marlins vs. Giants in 10th
Franco launches 2-run homer vs. Rangers
Maikel Franco sends a two-run home run out to right field in the Orioles' win vs. the Rangers.
No relief: Orioles score late of Rangers pen in 6-1 victory
— Trey Mancini had a tiebreaking RBI double in the eighth inning and the Baltimore Orioles won 6-1 at Texas on Saturday night, getting their runs against three relievers after Rangers rookie starter Dane Dunning threw six scoreless innings.