At a time when the Diamondbacks might not be able to afford any more losses, they turned in the sort of inexplicable defeat that has, at times, defined their season.

The Diamondbacks got the best outing of right-hander Brandon Pfaadt’s career — nine innings of one-hit, shutout work — but wound up losing, 5-1, in 11 innings to the San Francisco Giants on Wednesday afternoon, Sept. 17, at Chase Field.

The loss dropped them, for the moment, to two games back of the New York Mets in the wild-card race. The Diamondbacks then wound up still 1 1/2 games behind them, as the Mets lost 7-4 to the San Diego Padres later on Sept. 17.

The Diamondbacks have nine games remaining in their season — all against contending teams, starting with three against the Philadelphia Phillies this weekend — and need to play well and get help if they hope to claim the third wild-card spot in the National League.

They could not help themselves in the finale against the Giants, despite Pfaadt’s incredible performance. He allowed just one walk through the first five innings and did not give up his first hit until one out in the sixth.

But the Diamondbacks’ offense first was shut down by right-hander Justin Verlander over seven innings, then threatened — but repeatedly came up empty — against Giants relievers in the late innings.

“Unbelievable game,” Diamondbacks third baseman Blaze Alexander said of Pfaadt. “One of the best games I’ve played defense behind. It sucks. You want to get a run or two for him, try to get him the win there.

“But it’s on to the next one. There’s really no time to sulk. It’s do or die. On to the next one.”

Every win and loss carries outsized reactions in both directions this time of year, but this one — like the Diamondbacks’ previous loss, last week in Minnesota, when they blew a lead against the Twins after an improbable ninth-inning rally — feels particularly crippling.

This felt like one they could not lose.

Pfaadt became just the 18th pitcher in baseball history — and the first since Cleveland right-hander Carlos Carrasco in 2015 — to throw at least nine scoreless, one-hit innings without earning a win.

Of course, they have had many such losses already this season. There was Eugenio Suarez’s four-homer game they lost to the Braves in April. There was the game at Wrigley Field when they scored 10 runs in the eighth inning but lost, 13-11. There were other miserable losses at home to the Dodgers and Rockies, among others.

“That’s the type of year it’s been,” Diamondbacks manager Torey Lovullo said. “This year has been so unpredictable and frustrating and very fulfilling, on back-to-back days.”

He added: “I think we’ve absorbed and taken on a lot of tough losses this year. And the way that we’ve turned it around the next day has been fairly remarkable. That’ll be my standard and expectation for what we do on Friday.”

If the Diamondbacks end up claiming a spot, it seems as though they will have earned it. With series remaining against the Phillies, Dodgers and Padres, they will end their season with nine games against the teams with the second-, third- and fifth-best records in the NL.

Things are not so daunting, at least not on paper, for the other teams in the wild-card race.

The Mets, after finishing their series with the Padres, will play another tough set with the Chicago Cubs, but that matchup is bookended by series against the Nationals and Marlins.

The Giants and Reds — both of whom are a half-game behind the Diamondbacks at 76-76 — also have slightly more forgiving schedules. The Giants have to play the Dodgers four times, but they close out against the Cardinals and Rockies. The Reds face the Cubs and Brewers, but also have three remaining against the Pirates.

Not that the Diamondbacks are wrong to be ecstatic about the position they are in, considering they are a team that not only was battered by injuries but also sold five veteran players off the roster at the trade deadline.

“From what we did at the trade deadline to how we’ve been playing and keeping ourself in the fight, it’s exactly where we want to be,” Pfaadt said. “If we keep playing the baseball that we’ve been playing overall, I think we’ll be in a good spot.”

The Diamondbacks had the winning run on third with less than two outs in both the ninth and 10th innings but came up empty. The Giants, who went a combined 11 innings over the previous two days without getting a hit, finally pushed across a run in the top of the 11th against reliever John Curtiss, then proceeded to break the game open with multiple run-scoring hits.

“Looking at it, hey, we won the series,” Alexander said. “Good series for us. But games like those, you want to win. We’re there 90 feet away. But things happen.”

Said Lovullo: “This one hurt. This one definitely hurt. They all hurt this time of year. But we have to flush it as fast as possible. We have another huge series coming up against the Phillies. We have to go out and be at our competitive best.”

—Nick Piecoro

Crismatt to bullpen as rotation is adjusted

The Diamondbacks are rearranging their starting rotation for the final stretch of the season, shifting to a four-man rotation with three series remaining as they try to chase down the final wild-card spot in the National League.

Manager Torey Lovullo said right-hander Nabil Crismatt will shift to the bullpen, allowing the club to stick with a rotation of Ryne Nelson, Zac Gallen, Eduardo Rodriguez and Brandon Pfaadt, in that order, the rest of the way.

“Nothing against Crismatt, he’s been throwing the ball extremely well,” manager Torey Lovullo said. “We felt there would be some value in getting some length, some dependable length, out of the bullpen.

“The four guys have been leading the charge for us all year long. They’ve been throwing the ball — some have been throwing the ball exceptionally well. We wanted to match up the best we could against the most critical teams at the most critical times. We spend some time on it.”

Nelson, who has been the club’s most consistent starter since moving into the rotation in early June, will pitch the series opener against the Philadelphia Phillies on Friday night, Sept. 19. He lines up to make three more starts, the last of which would come on the final day of the season in San Diego.

If the Diamondbacks were to claim the wild-card spot, they would then have Gallen ready to start the first game of a division series. If they manage to clinch a spot before then, they could also push Nelson back rather than having him pitch in San Diego.

Crismatt has logged a 2.70 ERA in six games (five starts) since joining the Diamondbacks in August.

—Nick Piecoro

(This story has been updated to add new information.)