PHOENIX (AP) -- Arizona's Aaron Hill hit a game-ending single in the 14th inning to give the Diamondbacks a 5-4 win over Baltimore in Wednesday's clash of two teams in the thick of wild-card calculations in their respective leagues.
It was a third-straight walk-off win for the Diamondbacks, who remained 7 1-2 games behind the Los Angeles Dodgers in the National League West but a touch closer in the wild-card race, while the Orioles are six games off the pace in the American League East but also with realistic playoff ambitions.
Among other key games, Pittsburgh beat nearest rival St. Louis to open a three-game lead in the NL Central, Atlanta beat Philadelphia to make it 17 wins in 19 games and Boston lost in 10 innings at Toronto.
The Dodgers downed the New York Mets in 12 innings to make it eight straight wins, Texas rallied to beat Milwaukee and open a two-game lead in the AL West, while Tampa Bay ended a six-game losing skid by edging Seattle.
Baltimore led all three games against Arizona entering the seventh inning, but once again could not hold on to that advantage.
Hill forced extra innings with an RBI single in the ninth off Jim Johnson in the Orioles closer's second blown save in as many days.
Baltimore's Bud Norris (8-10), who started and threw five innings at San Francisco on Sunday, came on in the 14th and walked two batters ahead of Hill's single to take the loss.
Pittsburgh's Francisco Liriano was dominant coming off the worst outing of his career, steering the Pirates to a vital 5-1 win at St. Louis.
Liriano (13-5) allowed one run with six strikeouts and needed just 94 pitches to beat the Cardinals for the second time this year.
Pedro Alvarez hit his 29th homer of the season at an estimated 440 feet to straightaway center leading off the second, and with one out Garrett Jones lined one over the right field wall estimated at 392 feet.
Atlanta's Chris Johnson drove in three runs and Jason Heyward homered to power the majors-leading Braves to a 6-3 win over Philadelphia.
Atlanta starter Brandon Beachy (2-0) held the Phillies scoreless until conceding a homer with one out in the sixth.
Philadelphia has lost seven of eight series since the All-Star break and has dropped 13 of 14 on the road.
Toronto's Brett Lawrie singled home the winning run in the 10th inning to give the Blue Jays a 4-3 win over Boston.
Rajai Davis doubled off Brandon Workman (3-2) to begin the 10th and went to third on Jose Bautista's grounder. An intentional walk brought up Lawrie, who lined a two-strike pitch off the glove of the shortstop, bringing Davis home with the winning run.
Boston's Mike Napoli had hit a tying, two-run homer with two outs in the ninth.
Los Angeles' Yasiel Puig hit a slow bouncer past New York's diving shortstop and turned it into a one-out double in the 12th inning, then scored on Adrian Gonzalez's winning hit, lifting the Dodgers to a 5-4 victory over the Mets.
Puig -- who had been hitless in his first five at-bats -- ran out a double after his chopper glanced off the glove of the shortstop and into center field. Gonzalez hit the next pitch off Pedro Feliciano (0-1) down the left field line for the winner.
Andre Ethier had tied the game with a two-run homer in the ninth inning for L.A., which completed a three-game sweep of the Mets.
Texas' Elvis Andrus broke out of a slump with two hits and two RBIs for the Rangers, who rallied for three runs in the seventh inning and beat Milwaukee.
The AL West-leading Rangers had been 7-40 when trailing after six innings, but Andrus had an RBI single to snap an 0-for-13 skid and Ian Kinsler a two-run single that turned a two-run deficit into a lead for Texas.
Tampa Bay's Jason Bourgeois hit an RBI single to cap a two-run rally in the ninth inning which gave the Rays a 5-4 victory over Seattle.
The Rays trailed 4-3 when Ben Zobrist opened the ninth with a triple off rookie Danny Farquhar (0-1). Matt Joyce singled to tie it, Evan Longoria doubled and an intentional walk loaded the bases. Bourgeois singled to right over the Mariners' drawn-in outfield.
Cincinnati's Bronson Arroyo pitched seven crisp innings to steer the Reds to a 5-0 win over the Chicago Cubs and a three-game sweep.
Cleveland's Michael Brantley hit a sacrifice fly in the 12th inning as the Indians rallied to a 9-8 win over Minnesota.
Detroit's Miguel Cabrera hit a towering three-run homer as the Tigers ended a three-game skid with a 6-4 win over the Chicago White Sox.
New York's Alfonso Soriano homered twice for the second straight night and drove in a career-high seven runs -- giving him a staggering 13 RBIs in two games -- as the Yankees beat the Los Angeles Angels 11-3.
Washington's Denard Span made a diving catch in deep center field to end the game with two runners on base, allowing the Nationals to beat San Francisco 6-5 and notch a fifth-straight victory.
Colorado's Jorge De La Rose pitched seven solid innings and catcher Yorvit Torrealba completed a remarkable double play by tagging out two runners as the Rockies defeated San Diego 4-2.
Miami's Justin Ruggiano snapped a franchise-worst 0-for-42 slump with a single in the first inning and added two more hits and drove in a run to help the Marlins beat Kansas City 5-2.
Houston's Carlos Corporan hit an RBI double in the 11th inning, lifting the Astros to a 2-1 win over Oakland.