WASHINGTON — Ian Desmond strode the plate Sunday afternoon with a .175 average  after going 1-for-14 with six strikeouts in the three previous games of the series against the Nationals.

Naturally, Desmond blasted a solo homer to center in the ninth inning off of Sean Doolittle, lifting the Rockies to an improbable 6-5 victory and allowing to capture the four-game series.

Desmond rescued reliever Adam Ottavino, whose wild pitch allowed Michael Taylor to score from third base and tie the game, 5-5, in the eighth.

Colorado’s additional heroes were DJ LeMahieu and Charlie Blackmon — best buddies and former roommates — who kept the Rockies alive in a strange, mistake-filled affair at Nationals Park.

LeMahieu’s solo homer in the eighth inning off Shawn Kelley gave the Rockies a 5-4 lead. LeMahieu has already slugged five homers, a number he didn’t reach last season until Aug. 26. Blackmon, batting third as Nolan Arenado continued to serve his suspension, hit a solo shot off Washington starter Stephen Strasburg in the fourth and ripped a two-run double down the right-field line in the sixth.

The Rockies got an ugly, abbreviated start from left-hander Tyler Anderson, who walked six. All told, Colorado pitchers issued 10 free passes. It’s rare that a team can do that an win a game, but the Rockies managed to get away with it.

Though Anderson gave up only two hits, he walked six and needed 94 pitches to navigate 4 ⅔ innings.

Bryce Harper blasted a solo homer off Anderson in the first, but Anderson managed to dodge major trouble until the fifth, when he walked the bases full and left a two-out mess for reliever Antonio Senzatela. The Nationals quickly scored two runs, taking a 3-1 lead, with Taylor scoring on a passed ball by catcher Chris Iannetta, and Trea Turner coming in to score all the way from second on Iannetta’s subsequent throwing error.

Colorado took a 4-3 lead in the sixth on a pinch-hit single by Michael Tauchman, a walk by LeMahieu, Blackmon’s two-run and an RBI, opposite-field single by Carlos Gonzalez.

The lead didn’t last long. Matt Weiters tied the game on a solo homer off reliever Bryan Shaw, who gave up a double and two walks to load the bases before he was rescued by Jake McGee.