Four outs away from being swept by an utterly depleted division rival the Washington Nationals may have saved any dying hope for their season.

The Nationals topped the New York Mets 6-5 before a national TV audience on Sunday thanks to a dramatic comeback in the eighth inning that was capped by Jayson Werth’s run-scoring double to right-center field.

The rally hinged on a crucial sacrifice bunt by Bryce Harper three batters into the inning. It was a curious move at the time but Harper’s decision to move his teammates into scoring position helped the Nationals pull within 61 / 2 games of the Cincinnati Reds for the second wild-card spot.

Trailing 5-3 in the eighth the Nationals changed the course of the entire contest — and perhaps their final 26 games. Scott Hairston led off the inning with a single off left-hander Scott Rice. Pinch hitter Denard Span who has struggled against left-handers this season entered with a 14-game hitting streak on the line. He smacked a single up the middle. This was the first clue to Werth that something special was at work.

“I didn’t even know he had that streak going on” Werth said. “To extend [it] that like that when that happened I knew we had some magic working.”

Up came Harper with two runners on and no outs. Harper has struggled against left-handers as well this season. He had a slight limp earlier in the game but both he and Manager Davey Johnson said later his left knee wasn’t bothering him. In this situation Harper decided to trade an out for a base for each of his teammates. Johnson didn’t signal for the sacrifice attempt; Harper made the choice himself.

“You’ve got to get him over” Harper said. “You don’t want ground into a double play or anything like that. Down 0-1 he actually hung me a curveball I probably could’ve drove but I was lucky enough to get it down and get those guys over and get into a big inning.”

Harper’s bunt prevented the following hitter Anthony Rendon from hitting into a double play. Rendon’s groundball to shortstop Omar Quintanilla allowed Hairston to score and trim the deficit to 5-4. Ryan Zimmerman then hit a groundball up the middle toward Quintanilla who gloved the ball but couldn’t get much on the difficult throw to first base. Span raced around the bases and beat first baseman Lucas Duda’s throw home. The Nationals had tied the game at 5. While curious at the time the bunt proved vital.

“I wasn’t sure though because he took the first pitch” Hairston said. “But it was the right play. It was definitely the right play in that situation. In that situation you almost have to bunt. I know he’s hitting the ball well.”

Then Werth one of the hottest hitters in baseball provided the final blow in the comeback. He drilled the double that scored Zimmerman. After Zimmerman crossed home plate he pumped his fist. The entire Nationals bench was at the railing of the dugout jumping and cheering perhaps the most energy seen from this team all season.