PITTSBURGH -- Joe Maddon didn't have a chance to watch from the dugout as his club came back in a big way Friday night.
The Chicago manager was long gone, having been ejected from the game in the first inning, when the Cubs erupted for six runs in the ninth in a 9-5 win over the Pittsburgh Pirates at PNC Park.
Madden still liked what he saw from the clubhouse.
"That was pretty nice to watch," Maddon said. "A lot of good opposite-field hitting there. Moving the ball the other way is what really stood out. Up and down (the lineup), guys did a good job."
The Cubs, who blew an early 3-0 lead, trailed 4-3 entering the ninth. The damage, against three Pirates pitchers, was done by Willson Contreras (RBI double), John Jay (RBI single), Anthony Rizzo (two-RBI single) and Addison Russell (two-RBI double).
"You just keep playing -- that's all you can do," Russell said. "You can't get frustrated. We just kept playing, and eventually we came through when it counted and got a really nice win."
Koji Uehara (2-3) pitched a scoreless eighth for the win.
Juan Nicasio (1-3) took the loss after giving up four runs and three hits in the ninth.
Pittsburgh (30-37), which has lost two in a row, got three RBIs from Josh Bell on a homer and a triple. Andrew McCutchen drove in Bell with a single in the sixth for a 4-3 lead.
McCutchen doubled and scored on Francisco Cervelli's single in the ninth to make it 9-5 as the Pirates sent nine men to the plate but couldn't get a bigger rally going.
"It was a roller-coaster ride," Bell said. "It's too bad that we didn't come out on top, but just giving ourselves a chance in that last inning was fun."
Chicago (33-33) had lost 10 of its previous 11 road games and avoided matching a season low of two games below .500.
Cubs starter Eddie Butler allowed four runs and four hits with three walks and no strikeouts through 5 2/3 innings after initially shutting down the Pirates.
Butler did not allow a hit through 3 1/3 innings. He pitched to the minimum number of batters to that point. McCutchen was the only runner during that stretch with a two-out walk in the second, but he was picked off first.
Pittsburgh starter Trevor Williams, who was 2-1 in his previous six starts, allowed three runs and four hits, all in the first inning, with three strikeouts and two walks.
The first eight Cubs batters reached -- two walks, two singles, two double and two fielder's choices. Williams then retired 12 in a row before leaving for a pinch hitter in the fifth after throwing 76 pitches.
"(Catcher Francisco Cervelli) came up to me and just said, 'Why are you trying so hard? Why are you trying to do too much?'" Williams said. "It's a reminder that I've been trying to work through this entire year.
"I've been trying to make perfect pitches, especially early. You can't make perfect pitches every time. It's just about execution.
"(Cervelli) reminded me, and it really got me back to center and I figured out how to become the pitcher I am."
Things got heated quickly when Rizzo, the first batter of the game, hit a 1-1 ball over the right-field stands and into the Allegheny River on one bounce. It was initially called a homer -- it would have been his third leadoff homer in as many games -- but was changed by the umpiring crew to a foul ball.
Maddon was among the Chicago contingent who argued vehemently, and he got ejected.
"Rizzo hit a home run that was called fair, so that's the call on the field," Maddon said. "They get together, whereas instant replay is available, and somehow decided the ball was foul. Nobody was definitive about it.
"They might have thought it was foul, but nobody was sure it was foul. If it would be foul (by replay review), I would have been in the game for nine innings. It wasn't followed by procedure and they basically neutered instant replay by not (having a video review)."
Rizzo eventually walked, and while he was later thrown out at third, Chicago scored three times in the first. Ian Happ scored from third on a wild pitch and Contreras doubled in two runs for a 3-0 lead, although he was out at third trying for a triple to end the inning.
Pittsburgh didn't manufacture anything out of its first hit, a one-out single by Josh Harrison in the fourth, but its second hit off Butler was Bell's leadoff homer to left-center in the fifth, making it 3-1.
In the sixth, Bell chased Butler with a two-out, two-RBI triple off the right-field wall to tie it 3-3.
"I started to get tired," Butler said. "I lost some velocity in that inning, but I still could have gotten through it if I had located my pitches better. I kept trying to get that third out and I just never got it."
McCutchen greeted reliever Pedro Strop with an infield single, bringing home Bell for a 4-3 Pirates lead.
NOTES: Chicago 2B Ben Zobrist was put in the 10-day disabled list, retroactive to Tuesday, because of left wrist inflammation. ... The Cubs recalled 3B Tommy La Stella from Triple-A Iowa to take Zobrist's roster spot. ... Pittsburgh signed RHP Shane Baz, the 12th overall selection in the draft earlier in the week. He turns 18 Saturday and will begin his pro career in the Gulf Coast League. ... Before Cubs RHP and starter Eddie Butler threw a pitch, there was a delay while a trainer came to the mound and cut away his long, white sleeves under his uniform top after the Pirates objected because of the advantage it might offer with the white ball. ... The teams honored the Negro Leagues as part of an African-American heritage celebration, with the Pirates wearing Homestead Grays throwback uniforms and Chicago wearing Leland Giants throwback uniforms.