For 7 2/3 innings on Wednesday night, the D-backs led the Giants and looked to be on the way to their second victory in three games.
One hanging slider later, Arizona found itself on the wrong end of a 4-3 decision at AT&T Park.
Bengie Molina's two-out, three-run homer in the eighth inning off closer Chad Qualls gave the Giants their second consecutive come-from-behind victory.
On Tuesday night, it was a three-run blast by Travis Ishikawa that sealed Arizona's fate. Wednesday's loss seemed to hurt much more, because unlike Tuesday's back-and-forth nature, Wednesday was all D-backs for 7 2/3 innings.
"To lose a game like this in this fashion, where we're in control, stinks," D-backs manager A.J. Hinch said.
Arizona starter Doug Davis was on top of his game as he held San Francisco to just one run -- a homer by Juan Uribe in the seventh -- on three hits going into the eighth. Davis seemed to be on his way to his first complete game since 2006 as he retired the first two Giants of the inning.
Edgar Renteria then drew a walk, and Randy Winn blooped a single to right to put runners at first and second.
Hinch decided to go to his closer for a four-out save, and Giants manager Bruce Bochy sent Molina to hit for Ryan Garko.
Molina had not started the game due to tightness in his quadriceps, and Qualls jumped ahead of him with two quick sliders. The Arizona reliever then planned to either go farther outside with another slider or bounce one in the dirt.
"I know he doesn't walk much. He makes contact, so I was really happy to get ahead 0-2," Qualls said. "I had a lot of room to work with, and I don't even have to throw him a strike there in that situation and that's what I was trying to do. I just didn't execute the pitch."
Qualls hung the 0-2 slider, and Molina, who now is 4-for-6 against Qualls in his career, hit it into the first row of the left-field bleachers.
"We had him 0-2, and we didn't want to give him anything to hit," catcher Miguel Montero said. "He left a pitch out over the plate, and Molina is a good enough hitter to hit one out. It hurts."
Molina, who limped around the bases, came out of the dugout for a curtain call.
"My approach was just trying to hit the ball hard somewhere," he said. "I got lucky enough to get it up in the air. In that situation, you have to hope that he leaves something right down the middle of the plate or hangs a pitch and you take advantage of it."
Davis dressed quickly after the game and declined to speak with reporters. Qualls, though, summed up the frustration Davis certainly must have been feeling.
"Dougie threw too good of a game out there to deserve this," Qualls said. "He goes out there and throws a gem for 2 1/2 hours, and I mess it up in three pitches. Being in the bullpen is hard. Tonight, what happened, just hard pill to swallow. I feel bad for him. I feel bad for the team."
Qualls added that it was awful "to go out there and blow what everybody has worked for 2 1/2 hours in like a second."
"Davis did his job," Hinch said. "He did a nice job, pitched a good game, deserved the win, but didn't get it."
AT&T Park is a tough place for hitters, especially on a cool night like Wednesday, when the fog rolled in during the middle innings.
"It's hard to explain how that happens," Hinch said of the late homer. "A lot of balls are hit to the wall. A lot of balls are hit to the track. The marine layer was here, [but] that one carried through."
Steve Gilbert is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.