PHOENIX -- The D-backs have been defined by their resiliency all season, whether it be bouncing back from a bad inning or a bad game.

On the day they found out that All-Star second baseman Orlando Hudson would miss the rest of the season, the club's resiliency surfaced again when the club recovered from a 7-3 deficit to beat the Cardinals, 9-8, on Saturday in front of 45,931 at Chase Field.

"This is the way our year's been," said first baseman Conor Jackson, who started the scoring with a three-run homer in the first. "It's not like it's surprising. We get down, we come back, and we win by one run. How many times have you seen that this year? So we're used to it. It certainly isn't a new situation for us."

Arizona broke its franchise record with the club's 31st one-run win of the season after the D-backs answered the Cardinals' seven-run third with a five-run fourth.

When St. Louis took a four-run lead in the third and with starter Micah Owings out after 2 2/3 innings, the D-backs just wanted to peck away at the lead to try to come back.

"There's a lot of game left, and the way the game was going you just keep grinding, try to score as many runs as you can," manager Bob Melvin said.

As it turned out, the club did not need to do much grinding. After scoring a run in the third, Stephen Drew got it all back with a three-run homer in the fourth that tied the game at 7.

Melvin pointed out that Drew knew the Cardinals often attack him with breaking balls, as was the case in all three pitches of this at-bat.

"I just knew just to be patient, get a pitch that I could drive," Drew said of his 427-foot shot. "Finally I got a pitch to drive and just tried to put a good swing on it, tried not to do too much, get a sac fly, whatever it takes. It worked out tonight."

The D-backs added on when Aaron Miles missed second base while trying to turn a double play and all runners were safe. That left the bases loaded and allowed Arizona to score twice more against Todd Wellemeyer (3-2).

"It certainly made the inning a little different, how all of a sudden now we've got the bases loaded right there," Melvin said. "It did, but in a game like that, those are the kinds of little things that get lost in the shuffle."

At that point, both bullpens turned a shootout into a pitchers' duel the rest of the way.

Entering the game, Melvin likely might not have liked his chances in a game that turned to the bullpens early, with Tony Pena, Bob Wickman and Juan Cruz unavailable.

A patchwork group of five relievers combined to get the ball to setup man Brandon Lyon and closer Jose Valverde, who finished the effort with his 44th save. That unheralded group gave up just one run, with Dana Eveland (1-0) picking up the win by recording one out.

"The bullpen's great," Drew said. "They just come in and do their job. It's huge in a game like tonight."

Melvin described the contributions of Dustin Nippert as an important factor in the win. Nippert, a long reliever much of the season, pitched a perfect seventh inning in a role that usually belongs to Pena.

"He had to go in there in a role that he's not used to doing and did it beautifully," Melvin said.

That bullpen bailed out Owings, who suffered through his second straight poor outing. After pitching two scoreless innings, Owings gave up seven runs (two earned) in the third.

Two plays led to Owings' unraveling: Drew being unable to complete a double play that would have gotten the pitcher of the inning unscathed, and a two-out grounder back to the pitcher that he could not make the play on, which preceded Miles' three-run homer and led to the five unearned runs.

Owings struggled with location once again, just as he did during his five-run, three-inning performance on Monday and through July, when he compiled a 9.55 ERA. The past two starts followed a stretch of four straight quality starts from Owings during which he seemed to move past those July struggles.

"When we've seen him have trouble at times, it's command," Melvin said, "with the breaking ball still sharp when he gets through it, the fastball still playing the same velocity, he just loses command."

When the bullpen and offense picked Owings up, the D-backs won their fourth game in a row and stayed two games ahead of the Padres in the National League West following a 2-6 stretch that knocked them out of the division lead.

"This team's got some resiliency, we've talked about that all year," Melvin said.