PHOENIX -- It's certainly not the ideal winning formula, but it somehow seems to work for the 2013 cardiac D-backs.
After coughing up a three-run lead in the seventh and blowing their Major League-leading 26th save, the D-backs fought back to produce their 12th walk-off victory of the season Saturday as Eric Chavez smacked a fastball from Sandy Rosario into the left-center-field gap for the game-winning hit in a 4-3 win over the Giants at Chase Field.
The win, which kept the club six games back of the Reds for the second National League Wild Card spot, marked Arizona's 30th victory in its last at-bat this year.
"We're good late," Chavez said. "I don't know what that means, but we're good late."
By his own admission, Chavez hadn't been swinging the bat well since coming off the disabled list Monday. So when the Giants sacrificed a righty-on-righty matchup and intentionally walked NL MVP candidate Paul Goldschmidt in the bottom of the ninth with the game tied to bring the left-handed-hitting veteran to the plate, the least surprised person in the stadium was Chavez.
"I would've walked him, too," said Chavez, who was 0-for-11 with five strikeouts this week entering the at-bat. "I mean, you have to walk him there. They've been burned before by him, he's hit some big hits late in games against them, so I pretty much knew what [Giants manager Bruce Bochy] was going to do before he did it."
Moments later, though, Chavez hit the first pitch he saw from Rosario over the heads of the Giants' outfielders to drive in Willie Bloomquist, who singled to lead off the ninth and advanced into scoring position on Adam Eaton's sacrifice bunt.
"I had never faced that guy before, so I didn't know exactly what was coming. I was just looking for a strike," Chavez said. "I was getting pitched up all day today, a lot of fastballs up -- just didn't miss that one, I guess. It definitely feels good to get my first hit back that way. I felt like I was going to get hot, but then I came back and it just hadn't been the same."
Even so, one person standing in the dugout foresaw Chavez's game-winner hours before he was even in the position to come through for the club.
"I know Chavy's been struggling since he came back and he told me in BP, he said, 'My swing just stinks right now,'" said manager Kirk Gibson, "and I said, 'Yeah, it's going to wake up tonight at the right time.'"
Did it ever. The clutch hit helped avoid sending the D-backs into extra innings for the 21st time this year, which would've tied the franchise record. The club needed to score in the ninth after the Giants rallied for a three-spot two innings earlier off D-backs starter Trevor Cahill, who had held San Francisco scoreless through the first six frames despite allowing nine men to reach base.
The rally began with Gregor Blanco's second homer of the year, a solo shot to right, before Marco Scutaro drove in Angel Pagan two batters later with an RBI triple into the left-center-field gap, marking the end of Cahill's night.
"He still threw good," Gibson said. "I think he ran out of gas a little bit right there. You saw a lot more pitches were in the dirt in that last inning than the rest of the game, but we had to extend him as far as we could."
The lead trimmed to one with the tying run on third and one down, left-hander Eury De La Rosa proceeded to strike out Brandon Belt, before the next batter, Buster Posey, singled in the tying run on an 0-2 pitch with a two-out single off Josh Collmenter, who had retired the reigning NL MVP just twice in seven career matchups against him beforehand.
"That's a tough matchup," Gibson said. "He hit a ball up high, but it was out over and he's a good hitter."
Although the Giants' comeback left Cahill with a no-decision, the right-hander felt good about his team's chances of pulling through in the end.
"We've done it so often that I feel like if I leave the game in a tie game, it's kind of like a win almost," Cahill said. "We do a great job of holding the game where it is, then scoring runs late."
With the calendar now turning to September, the D-backs will enter the final month of the season with plenty of work to accomplish to make a run at a postseason berth, but it's a challenge the club appears to be up for.
"Don't give up; we're not going to give up," Chavez said to fans at Chase Field over the loudspeakers after the game Saturday. "Let's have a good month."
Tyler Emerick is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.