ST. LOUIS (AP) -- St. Louis' Adron Chambers singled home the winning run in the 14th inning to give the Cardinals a 4-3 win over Pittsburgh on Tuesday, cutting into the Pirates' lead in the National League Central division.
Four straight losses have seen Pittsburgh's division lead sliced to two games over St. Louis, with Cincinnati a further 1 1-2 games back after an extra innings win of its own.
By contrast, the NL East race looks as good as over, with Atlanta maintaining a 14-game lead after defeating Philadelphia, while in the West, Arizona remains 7 1-2 games off the Los Angeles Dodgers as both teams won.
In the American League, Boston extended its lead in the East with an 11-inning win over Toronto while Tampa Bay lost a tight one at Seattle to slump to its sixth-straight loss, and Texas' lead in the West remains at a single game as the Rangers lost to Milwaukee and rival Oakland was beaten by Houston.
St. Louis' Sam Freeman (1-0) pitched a scoreless 14th inning to set up the hosts for victory in the bottom of the frame.
Jon Jay singled off Jared Hughes (2-3) with one out to notch his fourth hit of the game. He stole second and then raced home on Chambers' hit, beating the throw to the plate and ending the game only five minutes short of five hours.
Atlanta's Kris Medlen won his fourth straight start by pitching the Braves to a 3-1 win over Philadelphia.
Medlen (10-10) appeared to be in danger of being sent to the bullpen a month ago, now his spot in the rotation appears secure. He left to a standing ovation after allowing one run in seven innings.
Chris Johnson gave Atlanta a 3-0 lead in the third inning with a two-run homer off rookie Ethan Martin (1-2). Johnson leads the National League with his .337 batting average.
There was a moment of silence before the game in honor of a fan who fell from the stadium to his death in the parking lot during Monday's game.
Arizona's Paul Goldschmidt hit the first pitch of the 11th inning for a game-ending home run -- having earlier tied the game with a homer in the ninth inning -- as the Diamondbacks made it back-to-back walk-off wins over Baltimore, beating the Orioles 4-3.
Goldschmidt hit his second game-ending homer of the homestand, lifting the first pitch by T.J. McFarland (1-1) just over the wall in right for his 29th homer and Arizona's 25th win this season in its last at-bat.
The Orioles have lost all five interleague series they have had against Arizona.
Boston's Shane Victorino hit a two-run single in the 11th inning to give the Red Sox a 4-2 win at Toronto.
Jarrod Saltalamacchia drew a one-out walk off Aaron Loup (4-5) and Will Middlebrooks followed with a single. Jacoby Ellsbury hit into a fielder's choice, with Middlebrooks forced out at second and Saltalamacchia advancing to third.
Ellsbury stole second before Victorino hit a ground-ball two-run single up the middle.
Los Angeles rookie starter Hyun-Jin Ryu got the better of Matt Harvey and guided the Dodgers to a 4-2 win over the New York Mets and their first seven-game winning streak since 2010.
Ryu (12-3) allowed one run and one walk in six innings. He is unbeaten in his past seven starts, winning six of them.
The Dodgers improved to 39-8 since June 22, becoming the first NL team with such a winning percentage over that length of time since the New York Giants in 1951
Nick Punto and A.J. Ellis drove in two runs apiece, with Punto's RBI double putting the Dodgers ahead in the fifth as they went on to beat the Mets for the eighth time out of nine.
Harvey (9-4) gave up four runs in six innings, having not allowed an earned run over his previous four starts.
Milwaukee's Scooter Gennett homered twice as the Brewers beat Texas 5-1, ending the Rangers' eight-game streak and costing them a chance to move two games above Oakland atop the AL West.
Marco Estrada (5-4) allowed one run in six innings.
Seattle leadoff hitter Brad Miller homered twice to help the Mariners defeat Tampa Bay 5-4.
After Justin Smoak ended Chris Archer's (6-5) night with a leadoff single in the sixth, Dustin Ackley gave Seattle a 5-4 lead with a triple.
Cincinnati's Shin-Soo Choo hit a tiebreaking two-run single in the 11th inning to lift the Reds to a 6-4 win over the Chicago Cubs.
Cleveland's Zach McAllister won for the first time in almost three months as he guided the Indians to a 5-2 win over Minnesota.
Chicago's Alejandro De Aza singled in the winning run with the bases loaded in the 11th inning to lift the lowly White Sox to a 4-3 win over Detroit.
New York's Alfonso Soriano homered twice and drove in a career-high six runs while Alex Rodriguez chipped in with a two-run double as the Yankees beat the Los Angeles Angels 14-7.
Washington's Adam LaRoche hit a two-run home run in the sixth inning to help lift the Nationals to a 4-2 victory against San Francisco.
San Diego's Nick Hundley homered and drove in two runs while Will Venable had three hits as the Padres rallied to a 7-5 win over Colorado.
Miami's Christian Yelich singled home the go-ahead run with one out in the 10th inning as the Marlins prevailed 1-0 over Kansas City in a pitching duel.
Houston's Jordan Lyles pitched seven innings for his first win in nearly two months, steering the Astros to a 5-4 win against Oakland.