Matt Wieters is out trying to steal second base against the Rockies. (Brad Mills/USA Today Sports)

Sean Doolittle paced around the mound. He tugged at the collar of his white jersey. He was incensed.

The Washington Nationals’ closer had been one strike away from a perfect ninth inning against the Colorado Rockies on Sunday afternoon, one strike from emerging unscathed with the score tied, one strike from ensuring the game at least would go into extra innings. But he grooved a fastball right down the middle to Ian Desmond, and the mistake landed, through stiff wind gusts and rain drops, 411 feet away over the center field wall at Nationals Park.

It coaxed a fist pump from Desmond, the beloved former National, as he trotted around the bases after his go-ahead home run. It left Doolittle enraged. And it left the Nationals, after they couldn’t push across a tying run and suffered a 6-5 loss, in a precarious situation just two weeks removed from starting the season 4-0.

“There’s so many reasons why this loss today is particularly frustrating,” a dejected Doolittle said. “The fact that we are shorthanded. The fact that it was a rough homestand. The fact that we had a chance to even the series and salvage [it] right there.”

With the result, the depleted Nationals — without Daniel Murphy, Adam Eaton and, for the past two days, Anthony Rendon — dropped three of four to the Rockies and finished 3-7 on their 10-game homestand. Coupled with the first-place New York Mets’ walk-off win, the loss left them six games behind the National League East leaders at 7-9. The Nationals and Mets will meet in Queens for a three-game set beginning Monday. Rarely do series this early carry so much weight.

“I think something’s missing right now,” Nationals starter Stephen Strasburg said. “In times like that, I think you can sit there and let it keep going or grind. And I think that’s what we’re trying to do, and that’s all we really can do. We’re too good of a team to not be winning games. It’s going to change.”

All told, Desmond’s home run shouldn’t have been the difference. Washington had plenty of opportunities to put Colorado away. But like most chances created this homestand, they were wasted.

Six Rockies pitchers combined for 10 walks, one hit batter and three wild pitches Sunday, and they had another pitch go down as a passed ball. Left-hander Tyler Anderson walked six. He walked three between the second and third innings. The Nationals put two runners on with no outs in both innings. Both times, they failed to score. They finished 0 for 8 with runners in scoring position and left eight runners on base.

“Don’t try to be a hero,” Nationals Manager Dave Martinez said. “Just try to drive in a run. That’s what we’re asking for. When you start doing that, good things happen.”

The Nationals’ mistake-laden base running also surfaced again. In the seventh, Bryce Harper was doubled off at first base because he thought, based on the crack of the bat, Howie Kendrick’s flyball was at least going off the wall. Instead, center fielder Charlie Blackmon got under it comfortably. Harper was already sprinting around second base when he noticed. He had no chance.

An inning later, with the Nationals trailing 5-4 after DJ LeMahieu’s home run off Shawn Kelley, Matt Wieters, a catcher with eight career steals in nine-plus major league seasons, tried to swipe second base and was thrown out for the first out. Martinez said Wieters had the green light because Adam Ottavino, the reliever on the mound, has a slow delivery. Asked whether he considered pinch-running with Pedro Severino, a faster catcher, Martinez said he did but decided against it because he had a short bench with Rendon unavailable because of a sore big toe.

“We knew Ottavino was a two [seconds] to home, so he went,” Martinez and. “And you know what? I was okay with it. I really was.”

The gaffe proved costly later in the inning when Michael A. Taylor smacked a two-out double down the left field line. He then stole third base and scored on a wild pitch to tie it, but the Nationals could have emerged with the lead.

Conditions on Sunday, as was true for most of the homestand, seemingly didn’t favor those in the batter’s box. The temperature at first pitch was 52 degrees — 25 degrees lower than Saturday’s ideal setting — but the wind was the peskiest obstacle. Gusts were steady over 15 mph, blowing in from right to left. It made matters difficult for fielders and worse for hitters. But there were exceptions.

Harper slugged the first of five solo homers between the teams in the first inning, when he hammered a ball through the wind 109.1 mph off his bat and 418 feet away in the seats beyond the wall in right-center. After Blackmon matched Harper in the fourth, the Nationals added two runs in the fifth without a hit thanks to a passed ball and a throwing error by catcher Chris Iannetta on the same pitch. The mistakes allowed Taylor to score from third and Trea Turner to score from second.

Strasburg was rolling through five innings: Rockies hitters not named Blackmon were 0 for 14. But Strasburg encountered some bad luck in the sixth. After a single and a walk, Blackmon sneaked a dribbler down the right field line for a two-run double. Next, Carlos Gonzalez smashed a line drive to where the shortstop usually stands — but Turner was shifted up the middle, so Gonzalez had a go-ahead RBI single.

“It normally doesn’t add that way,” Strasburg said. “They just hit it where we weren’t.”

Yet after the bad breaks and wasted chances and odd base running, the Nationals had their closer on the mound, ahead 0-2 in the count with two outs in the ninth. He wasted three pitches out of the strike zone, saw Desmond foul off a fourth, then watched him launch the next one.

“Yeah,” Doolittle said, “that one hurts.”