– 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 over the Nationals. 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⅓ innings and left with the score 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 that allowed three runs to score.

Nieuwenhuis gave New York its first lead with a drive to right off Papelbon, obtained before the July 31 trade deadline to help Washington's drive to the postseason. It was Nieuwenhuis' fourth home run; the other three came in one game against Arizona on July 12.

"We're playing like we don't have anything to lose, and that's what we need to do," Nieuwenhuis said. "I'm just going to enjoy the ride."

Jeurys Familia got three outs for his 38th save.

Harvey has thrown 171⅔ innings this year, his first season since undergoing elbow ligament-replacement surgery in October 2013. New York manager Terry Collins spoke before the game as if Harvey has one outing left — to be used when most needed.

"If the last series of the season means us getting in or out and Matt Harvey needs to pitch, he's pitching," Collins said.

"That'll be his playoff."