WASHINGTON - Kirk Nieuwenhuis hit a tiebreaking, pinch-hit homer in the eighth inning off Jonathan Papelbon, and the resilient New York Mets rallied from a six-run deficit to beat the Washington Nationals 8-7 Tuesday night after Matt Harvey struggled on the mound.

The Mets' second straight comeback win over Washington extended their lead in the NL East to six games. New York will seek to complete a sweep on Wednesday.

Perhaps making one of his final starts of the regular season, Harvey gave up a career high-tying seven runs on eight hits in 5 1-3 innings and left with New York trailing 7-1.

The Mets erased the deficit with a six-run seventh inning fueled by six walks and a wild pitch. The big blow was a three-run double by Yoenis Cespedes, who one inning earlier committed an error in centre field that allowed three runs to score.

Nieuwenhuis gave New York its first lead with a drive to right off Papelbon (3-2). It was Nieuwenhuis' fourth home run; the other three came in one game against Arizona on July 12.

Addison Reed (3-2) worked the seventh and Jeurys Familia got three outs for his 38th save. With two runners on, Familia got Yunel Escobar to ground into a game-ending double play.

CUBS 8, CARDINALS 5

ST. LOUIS - Starlin Castro and Anthony Rizzo homered and combined for seven RBIs and Chicago earned its fifth straight win, beating St. Louis 8-5 in the middle game of a three-game series.

The Cardinals have the best record in the majors at 87-51, but have dropped five of six. Their lead over Pittsburgh in the NL Central slipped to 4 1/2 games. The Cubs are 6 1/2 back and are second in the NL wild card race behind the Pirates.

St. Louis was down 8-0 before pinch-hitter Randal Grichuk sparked a five-run seventh with a two-run homer estimated at 451 feet in the seventh.

Jason Hammel (8-6) allowed three runs in six-plus innings for Chicago, which has won five in a row.

Michael Wacha (15-5) gave up six runs in four innings, his shortest outing of the season and on 10 days' rest.

PIRATES 7, REDS 3

CINCINNATI - Andrew McCutchen hit a three-run homer and left-hander Francisco Liriano pitched six shutout innings as he finally beat Cincinnati on his 11th try, leading Pittsburgh to a victory.

The Pirates are 5-10 this season against the Reds, who have dominated their Ohio River rivalry over the last two years.

McCutchen connected in the third inning off rookie Raisel Iglesias (3-7), who lasted only three innings.

Liriano (10-7) came into the game 0-5 in 10 regular season starts against Cincinnati, the only team he had faced but hadn't beaten during his career. The left-hander allowed three hits, struck out 10 and didn't allow a runner beyond second base.

He also doubled and scored the Pirates' first run off Iglesias, who had his streak of seven consecutive quality starts snapped. It was the longest such streak by a rookie in the majors this season.

ROYALS 4, TWINS 2

KANSAS CITY, Mo. - Eric Hosmer hit a three-run double, Kendrys Morales drove in another run and Kansas City hung tough through eight more innings for a victory over Minnesota that snapped a four-game skid.

Edinson Volquez (13-7) settled down after a shaky start to last seven innings, allowing six hits and two runs - consecutive RBI hits by the Twins' Brian Dozier and Joe Mauer.

Volquez had been hammered for at least six earned runs in three of his past five starts.

Kyle Gibson (9-10) also recovered from a brutal start to last eight innings, but the Twins' offence was unable to bail him out. The young right-hander allowed his first six batters to reach, and Hosmer and Morales staked Kansas City to an early 4-0 lead.

ORIOLES 2, YANKEES 1

NEW YORK - Chris Davis led off the ninth inning with his major league-leading 41st home run and Baltimore beat New York for just their fourth win in 19 games.

The Yankees began the day a half-game behind AL East-leading Toronto. They failed to take advantage of Masahiro Tanaka's 10-strikeout performance and Alex Rodriguez's 30th homer - A-Rod has reached the mark in 15 seasons, tying Hank Aaron's record.

Davis homered for the sixth time in seven games, lofting an opposite-field drive into the seats in left. He was the first batter Chasen Shreve (6-2) faced after Tanaka pitched eight innings.

Davis, like Rodriguez, is enjoying a resurgent season. The Orioles' slugger led the majors with 53 home runs in 2013, but hit just 26 last year and drew a drug suspension down the stretch.

BLUE JAYS 5, RED SOX 1

BOSTON - Troy Tulowitzki singled in the go-ahead run off Alexi Ogando to trigger a four-run 10th inning that lifted AL East-leading Toronto to a 5-1 victory over Boston.

With the win, Toronto increased its lead in the East to 1 1-2 games over the New York Yankees, who lost 2-1 to Baltimore. The Blue Jays won for the 13th time in 17 games.

Travis Shaw homered for Boston, which had its four-game winning streak stopped.

Josh Donaldson led off the 10th with a triple against Ogando (2-1), a towering fly ball that appeared to hit the top corner of the Green Monster and bounced back.

After a review upheld the call of the ball not crossing the red line at the top for a homer, the crew reviewed and confirmed Donaldson was safe at third.

Tulowitzki singled past third baseman Pablo Sandoval. Chris Colabello followed with an RBI single, Ogando balked in the next run and Kevin Pillar had a sacrifice fly.

PHILLIES 5, BRAVES 0

PHILADELPHIA - Rookie Aaron Nola pitched seven innings and Odubel Herrera hit a three-run homer to lead Philadelphia over Atlanta.

Nola (6-2) rebounded from the worst start of his career, allowing six hits with a career-high seven strikeouts and one walk, to help Philadelphia snap a five-game losing streak. The right-hander gave up six runs and nine hits in four innings of a 9-4 loss at the New York Mets last Wednesday.

Cesar Hernandez had two hits and Brian Bogusevic had an RBI for Philadelphia.

A day after snapping their 12-game losing streak and 13-game road skid, Atlanta managed just seven hits against three Phillies pitchers while losing its 20th game in the last 22.

MARLINS 6, BREWERS 4

MIAMI - J.T. Realmuto hit two home runs, including an inside-the-parker, to help lead Miami over Milwaukee.

Justin Bour drove in two runs. Dee Gordon recorded his 49th multihit game with two knocks and also stole two bases, giving him 50 on the season.

Kyle Barraclough (2-0) picked up the win after retiring all five batters he faced, striking out the last four.

A.J. Ramos got the final four outs for his 24th save in 30 opportunities. Ramos entered in the eighth and struck out Jason Rogers with two runners on to end the inning and preserve a two-run lead.

Brewers starter Taylor Jungmann (9-6) lasted just 3 2-3 innings, allowing six runs and seven hits.

TIGERS 8, RAYS 7, 13 innings

DETROIT - Rajai Davis' sacrifice fly gave the Tigers the win in a game that was tied four times, the last at 7-7.

James McCann led off the 13th with an infield single, and Andrew Bellatti (0-1) couldn't pick up Jefry Marte's bunt attempt, putting runners on first and second. Andrew Romine laid down a successful bunt putting runners at second and third.

Davis hit a fly ball to shallow left-centre, but McCann broke for the plate and Grady Sizemore's throw home was weak and offline.

Kyle Ryan (2-3) picked up the win.

J.D. Martinez put the Tigers up 7-6 with an eighth-inning homer. In the ninth, Tigers closer Bruce Rondon loaded the bases with two walks and a single. Evan Longoria lifted a routine fly ball to deep left. Davis dropped the ball, allowing Kiermaier to score the tying run.

The teams combined to use 29 position players and 16 pitchers, 10 for Detroit, matching the franchise record set in 1998.

WHITE SOX 7, INDIANS 4

CHICAGO - Rob Brantly smacked a three-run homer for his first American League hit, and rookie Carlos Rodon allowed one run through seven innings to lead Chicago.

Jose Abreu went 3 for 4 - including his 26th homer and a double - to drive in two runs and help the White Sox win for the fifth time in six games. Trayce Thompson also had two RBIs.

Rodon (7-6) scattered five hits, struck out eight and walked one in his sixth straight quality start. He is 3-2 in that span while yielding eight earned runs in his last 41 innings.

Michael Brantley hit a two-run homer off White Sox reliever Nate Jones in the eighth and pinch-hitter Jose Ramirez added a solo shot off Zach Duke in the ninth. Mike Aviles had three hits and drove in the Indians' other run.

Cleveland starter Carlos Carrasco (12-10) lasted 2 2-3 innings, allowing four runs, four hits and three walks in his first start since Aug. 21. He was on the disabled list with right shoulder inflammation.

GIANTS 6, DIAMONDBACKS 2

PHOENIX - Tim Hudson pitched six effective innings in his return to the rotation and hit his first homer in two seasons for San Francisco.

Hudson (7-8) was sharp while subbing for Ryan Vogelsong, who pitched in relief the night before. Hudson allowed a run and four hits in his first start since July 26.

He hit a solo homer in San Francisco's five-run third inning off Chase Anderson (6-6) and later added a single.

Gregor Blanco and Joe Panik also homered in the third for the Giants, who won for the third time in 11 games as they try to make up ground on the Los Angeles Dodgers in the NL West.

Jarrod Saltalamacchia homered for the Diamondbacks.

ATHLETICS 4, ASTROS 0

OAKLAND, Calif. - Sonny Gray outpitched close friend Scott Kazmir, and the Athletics spoiled the former Oakland lefty's return to the Coliseum.

Mark Canha hit a three-run homer in the fifth inning after Billy Burns' earlier solo shot to back Gray (13-7). The All-Star right-hander ended a four-start winless stretch and got the best of mentor Kazmir, traded by the A's to his hometown Astros on July 23.

Kazmir had been back to the Bay Area with Houston but didn't pitch against his old team during that trip in early August. He faced A's for the first time since Aug. 18, 2013, with the Indians.

Gray allowed five hits, struck out four and walked two in seven innings.

Kazmir (7-10) lost his second consecutive decision. He was tagged for four runs and seven hits in six innings.

DODGERS 6, ANGELS 4

ANAHEIM, Calif. - Clayton Kershaw gave up four hits and two runs over seven innings to win his eighth consecutive decision, and Justin Ruggiano hit a leadoff homer for the Dodgers in their 13th victory in 15 games.

Corey Seager had a run-scoring double during the Dodgers' four-run sixth inning in their eighth consecutive win over their Freeway Series rivals.

Ruggiano and Seager had two hits apiece as the Dodgers (80-58) moved to a season-best 22 games over .500 and maintained their healthy 8 1-2 game lead over San Francisco in the NL West.

Kole Calhoun hit a leadoff homer for the Angels (69-69), who dropped back to .500 with their 12th loss in 18 games. Rookie Andrew Heaney (6-3) couldn't match Kershaw, yielding six hits and five runs.

Kershaw (13-6) is unbeaten since June 27 after striking out eight and allowing one earned run. The reigning NL MVP is 8-0 in his last 11 starts with a 0.93 ERA and 112 strikeouts.

Reigning AL MVP Mike Trout flied out, struck out and walked against the Dodgers' dominant left-hander. Trout is 0 for 16 with eight strikeouts in his last four games against the Dodgers overall.

PADRES 2, ROCKIES 1

SAN DIEGO - Brett Wallace's fielder's choice grounder drove in the winning run in the bottom of the ninth for San Diego.

Corey Spangenberg doubled to lead off the ninth against Boone Logan (0-3) and advanced to third on a sacrifice bunt by pinch-hitter Clint Barmes.

Wallace followed with a ground ball to shortstop Jose Reyes, who threw home but Spangenberg beat the throw.

The win snapped a four-game losing streak for the Padres.

Colorado's Nolan Arenado tied the game in the ninth with a two-out, solo home run to left off Craig Kimbrel (2-2). The blown save is Kimbrel's third of the year.

San Diego pitchers had retired 16 straight before Arenado's league-leading 37th home run.

RANGERS 9, MARINERS 6

SEATTLE - Cole Hamels shook off a line drive that hit him in the left shoulder, and Texas hit four home runs.

Hamels pitched seven innings to help the Rangers move within one game of first-place Houston in the AL West.

Mitch Moreland, Shin-Soo Choo and Rougned Odor connected off Mariners starter Taijuan Walker, who lasted three innings. Joey Gallo went deep in the eighth.

With two runners aboard in the third, Jesus Sucre lined a 1-0 pitch straight back to the pitcher's mound. Hamels (3-1) managed to deflect the ball with his glove before it slammed into his shoulder, causing the left-hander to stumble and fall to the ground. He remained in the game and got out of the jam with just one run allowed on a fielder's choice by Kyle Seager.

Hamels, acquired from Philadelphia in late July, gave up four runs and eight hits. Shawn Tolleson earned his 31st save.

Walker (10-8) yielded six runs, five earned, and six hits.