WASHINGTON - Nothing good came of Tuesday night for the Yankees.

Short term there was the disheartening 8-6 walk-off loss to the Nationals in front of 37,355 at Nationals Park, the Bombers' sixth loss on a nine-game trip.

And long term, though it wasn't immediately clear, there might have been a bigger loss, that of centerfielder Jacoby Ellsbury, who left the game with what the Yankees called a "right knee injury."

The Nationals won it in the 10th on Ryan Zimmerman's two-out, two-run homer off Andrew Miller.

Miller, who took over for Dellin Betances, walked Yunel Escobar with one out. Miller struck out Bryce Harper, but grooved a 3-and-1 pitch that Zimmerman smacked off the rightfield foul pole for the game-winner. They were the first runs allowed by Miller this season.

Meanwhile, a Yankees' offense that came in having totaled 11 runs in their last six games, produced some of the big hits missing much of last week. They knocked out Gio Gonzalez, who retired the first nine batters he faced, after five innings.

The Yankees actually led 6-2, after Mark Teixeira's two-run homer in the fifth, but Nathan Eovaldi and the bullpen couldn't hold it.

Eovaldi, who allowed first-inning homers to Ian Desmond and the scorching Harper -- the blast gave him 10 homers in his last 12 games and 15 overall -- was gone after 41/3 innings having allowed five runs and seven hits.

David Carpenter's struggles continued as he gave up Wilson Ramos' solo homer in the sixth that tied it at 6.

Harper, who entered Tuesday night leading the National League in home runs, RBIs (37), walks (36), runs (36) and OPS (1.206) and was 22-for-39 with a 1.385 slugging percentage in his previous 11 games, went 1-for-4 with a walk. But he failed to come through twice in big spots. The first came in the three-run fifth when lefty Justin Wilson, with two on, induced an inning-ending 4-6-3 double play. In the seventh, with runners at first and second and two outs, lefthander Chase Shreve, a former college teammate of Harper's, struck him out.

Gonzalez was perfect through three, needing just 30 pitches, but lost his command in the fourth, leading to a four-run inning.

Ellsbury led off with a walk and went to second on Brett Gardner's fielder's choice.

Before Chris Young stepped in, Joe Girardi and trainer Mark Littlefield visited Ellsbury, who pointed to his right leg. He stayed in the game, scoring on Young's single, the Yankees' first hit, which made it 2-1.

Teixeira drew a walk and, after Brian McCann grounded into a force play, putting runners at the corners with two outs, Chase Headley ripped a double into the corner in left to tie it at 2.

After Jose Pirela reached on an infield single to load the bases, Stephen Drew lined a 1-and-2 fastball to center for a two-run single that made it 4-2.

Ellsbury was replaced in the bottom half of the inning. Young shifted from right to center and Carlos Beltran entered the game in right.

Teixeira's two-run blast in the fifth gave him a team-best 12 homers and 30 RBIs.