The Chicago Cubs had a 5-4 lead going into the ninth inning, but the Pittsburgh Pirates stormed back and collected their third straight victory over the North Siders.
After Addison Russell tried and failed to throw out Elias Diaz at the plate in the bottom of the ninth, the Pirates won the game on a sacrifice fly from Corey Dickerson to give themselves a chance to sweep the four-game series on Thursday.
The loss dropped the Cubs' record to 45-42 on the season, and dropped their record to 4-15 in their last 19 games away from Wrigley Field.
On the positive side, Javier Báez hit a home run and collected three total hits, and Victor Caratini blasted home runs from both sides of the plate in the loss.
Yu Darvish gave up four earned runs in 6.2 innings of work, and got another no-decision for the Cubs.
For the Pirates, Josh Bell hit yet another home run for the Pirates and drove in two runs, while Melky Cabrera also had a pair of RBIs in the victory.
The Cubs seized an early lead in the second inning when Caratini launched a home run to right field, giving Chicago a 1-0 advantage. They doubled that lead in the fourth as Russell singled to left, scoring Willson Contreras for the game's second run.
The Pirates took the lead back in the fourth as Bell hammered a double to right field, and Cabrera followed it up with a home run to right-center, giving Pittsburgh a 3-2 lead.
Báez tied the game in the fifth with a home run, but Bell hammered another home run in the sixth, his 26th of the season.
Caratini gave the Cubs a lead in the seventh when he hit his second home run of the game, putting Chicago ahead 5-4.
That lead held until the ninth inning when Jung Ho Kang lofted a fly ball to right field. The ball barely eluded Willson Contreras, but it was enough to put runners on second and third with only one out.
The Cubs opted to pitch to the red-hot Adam Frazier, and although he hit a ground ball to second base, Russell, who was playing back, was unable to throw out the tying run at the plate as the Pirates evened the score at 5-5.
With one out, Dickerson hammered a ball to left field, and Kyle Schwarber couldn't throw out Kang at the plate as he scored the winning run.
The Cubs will try to avoid a sweep on Thursday as they square off with the Pirates at PNC Park.