Kirk Nieuwenhuis hit a pinch-hit solo homer with two outs in the eighth off Jonathan Papelbon as the first-place New York Mets came back from a six-run deficit to stun the Washington Nationals 8-7 on Tuesday.

It was the largest deficit the Mets (77-61) have overcome to win a game this season and extended their lead in the National League East to six games over the Nationals (71-67).

"You've got to be kidding me," Mets manager Terry Collins said. "I don't have words for it. I am not sure I have been involved in a bigger win than that.

"There is no sense of panic on the bench. It has to do with character. That is a big value of any player. This means a lot to everybody in that room."

It was the first career pinch-hit homer for Nieuwenhuis, who was 2-for-18 as a pinch-hitter this year. He last homered on July 12.

The Mets had scored six runs in the seventh to level the game at 7-7.

"It was almost hard to believe," Washington starter Jordan Zimmermann said of the seventh, when three Nationals relievers walked six batters.

Shortstop Wilmer Flores had an RBI single against reliever Blake Treinen before right fielder Curtis Granderson walked with the bases loaded off Felipe Rivero to trim the margin to 7-3.

Yoenis Cespedes then lined a three-run double down the left field line with two outs off Drew Storen to cut the margin to 7-6.

After two more walks, Mets first baseman Lucas Duda then drew another off Storen with the bases loaded to tie the game.

Addison Reed (3-2) got the win for New York, while Tyler Clippard pitched a scoreless eighth for the Mets and closer Jeurys Familia pitched the ninth for his 38th save.