– Denard Span decided during warmups that the tightness in his back was tolerable and he would play.

He felt a whole lot better when he was running out an infield single in the 11th inning, which drove in the go-ahead run.

Scratched from the lineup the previous night because of his back, Span had three hits and two RBI in the Washington Nationals’ 5-4 victory Wednesday that ended the New York Yankees’ seven-game winning streak.

“Get on my horses. We need a win, and we’re ready to get on an airplane,” Span said.

“So I just dug deep and tried to get to first.”

Span’s hustle helped the banged-up Nationals win for only the third time in 12 games.

Michael Taylor hit a tying, two-run homer in the eighth for Washington against 22-year-old fellow rookie Jacob Lindgren.

Tyler Moore led off the 11th for the Nationals with a single off Chris Capuano (0-4) and advanced on Jose Lobaton’s sacrifice and Danny Espinosa’s tapper back to the mound.

Span then hit a high chopper up the middle. Second baseman Stephen Drew fielded the ball as he crossed second base, but Span beat the one-hop throw.

“We need [Span],” Nationals manager Matt Williams said, referring to the former Twin. “He’s an important part of our club.”

Blake Treinen (2-2) pitched two scoreless innings for the win, and Drew Storen was perfect in the 11th for his 19th save, tying St. Louis’ Trevor Rosenthal for the NL lead.

Alex Rodriguez had a tiebreaking double to end a 0-for-11 drought in a four-run seventh that put New York up 4-2.