WASHINGTON - Ryan Zimmerman's career-long knack for game-ending homers trumped Andrew Miller's season-long ability to avoid allowing opponents to score.

Zimmerman's two-run shot off the right-field foul pole with two outs in the 10th inning off Yankees closer Miller, who hadn't allowed a run in 2015, lifted the surging Washington Nationals to an 8-6 comeback victory Tuesday night over New York and into a first-place tie in the NL East.

"He's not a real emotional guy. He just doesn't get caught up in the moment and try to do too much," Nationals reliever Drew Storen said about Zimmerman. "Obviously, more times than not, it works out pretty well for him."

Zimmerman's fifth homer this season — and 10th game-ending homer of his career — earned him a celebratory pour of chocolate sauce by teammate Max Scherzer.

It also made a winner of Matt Grace (2-0), who threw the 10th and was helped by centre fielder Denard Span's sprinting, diving, tumbling catch of Brett Gardner's sinking liner.

Bryce Harper hit one of Washington's three solo shots, giving him an NL-high 15 homers this season, as the Nationals improved to 13-4 in May.

After being 7-13 and eight games out of first place on April 27, they have moved to 23-17, even with the New York Mets in their division.

"We've really stayed with it and trusted what we're doing," said Storen, one of five Nationals relievers who combined for five scoreless innings.

That helped set things up for the 10th, when Yunel Escobar walked. Miller struck out Harper, bringing up Zimmerman.

After Zimmerman stayed away from Miller's tough slider, what was the lefty trying to throw?

"Not a fastball up and away. That's kind of what he hits. And I knew that going into it. I just threw a really poor pitch," said Miller, who in college at Miami faced Zimmerman's Virginia team. "And, you know, it stinks. I let everybody down."

Miller (0-1) had converted his first 13 save chances of 2015.

Neither Miller nor Yankees setup man Dellin Betances, who threw two innings Tuesday, had given up an earned run this season.

"The two guys at the back end of our bullpen have been really special," manager Joe Girardi said after his Yankees lost for the sixth time in their past seven games.

Harper and Ian Desmond hit solo shots in the first inning off Nathan Eovaldi, with Harper's grabbed by a fan leading over a railing above the out-of-town scoreboard just to the right of straightaway centre.

After a replay review, Harper's homer stood. Coming off consecutive NL Player of the Week awards, he entered the day leading the majors in RBIs, slugging percentage, on-base percentage, runs and walks.

New York scored the game's next six runs off Gio Gonzalez to lead 6-2, including Mark Teixeira's two-run homer in the fifth.

The Nationals made it 6-all in the sixth on Wilson Ramos' homer off a 3-0 fastball to make it 6-all. That extended Ramos' hitting streak to 19 games.

It also extended a game that Zimmerman would win.

Washington picked up its 11th comeback victory of the season, and third walkoff win.

"We knew," Zimmerman said, "we were going to play baseball like we were supposed to."

HARPER'S NIGHT

In the fifth, Justin Wilson got Harper to roll into an inning-ending 4-6-3 double play. As Harper crossed the bag at first, he pulled off his red batting helmet and chucked it to the ground, where it bounced and rolled quite a bit in foul territory toward right field. In the seventh, Harper struck out swinging against Chasen Shreve, a lefty he's known since both were teens in Nevada.

TRAINER'S ROOM

Yankees: CF Jacoby Ellsbury was put on the 15-day DL with a sprained right knee after leaving in the fourth inning. ... RHP Masahiro Tanaka is slated to throw about 45 pitches in a minor league rehab start at Triple-A Scranton-Wilkes-Barre on Thursday.

Nationals: LF Jayson Werth went on the 15-day DL with a bruised left wrist. Washington recalled INF Wilmer Difo from Double-A Harrisburg. Difo made his major league debut in the seventh inning, delivering a pinch-hit single.

UP NEXT

In the 11th start of his career, and first against the Nationals, Yankees RHP Adam Warren (2-2, 4.50 ERA) is scheduled to become the latest pitcher to try to slow down Harper. Warren goes up against Nationals RHP Jordan Zimmermann (3-2, 3.66).