PHOENIX -- The significance of the D-backs' Friday night win over the Reds was more than just Brandon Webb's 20th victory of the season.

Sure, Webb finally achieved one of the biggest milestones a pitcher can, but more importantly, the D-backs snapped a miserable six-game losing streak, as they defeated the Reds, 3-2, at Chase Field.

After a road trip which they went into with a 1 1/2-game lead and left trailing the Dodgers by 3 1/2 games, needless to say, Friday night was a must-win for the D-backs to get back on track for the final stretch of the season.

"The team needed a win," Webb said. "Hopefully, we can build off this."

"Every win right now is a must-win for the whole team. We're down to 16 games after today and every game is a must-win. We can't look and see what everybody else is doing, we just have to worry about what we're doing and battle every day."

Webb was masterful in his eight-inning, five-hit gem, allowing no runs. He was efficient, as he threw 95 pitches through eight innings, getting ahead in the count on several hitters throughout the night.

It was just what the D-backs needed, especially since the team still flirted with disaster in the ninth inning.

Webb left the game with a 1-0 lead. He was removed for pinch-hitter Jeff Salazar, who tripled to lead off the bottom of the eighth. After shortstop Stephen Drew struck out, Reds relief pitchers Jared Burton and Bill Bray combined for three walks, scoring one more run.

Reds manager Dusty Baker put in pitcher Mike Lincoln after the walks. After striking out Mark Reynolds, Lincoln threw a wild pitch to Chad Tracy, scoring David Eckstein from third, making the score 3-0.

D-backs manager Bob Melvin went with his closer, Brandon Lyon, in the top of the ninth. As was the case with Lyon in recent games, he struggled mightily Friday. After getting Joey Votto to fly out to lead off the inning, Edwin Encarnacion singled. Following a Jay Bruce strikeout, Lyon allowed three consecutive singles, scoring two runs.

Melvin put in Chad Qualls to slam the door on pinch-hitter Jerry Hairston Jr., who struck out to end the game. It was Qualls' third save of the year.

"A win is a win. That's all we're talking about," Melvin said. "That's a concern. ... [Lyon's] making his pitches, yet at that point, I had given him enough rope and I needed to go get him."

Reds starter Aaron Harang was almost equally efficient as Webb. Had it not been for his own throwing error in the sixth inning, the Reds could have been looking at a completely different fate.

Eckstein hit a high chopper to Harang, who threw the ball down the line, allowing the hustling Eckstein to reach third base. On the very next pitch, Eckstein scored on a Chris Young single to left field.

The D-backs have lately been prone to scoring late runs. On Friday, their insurance runs were the difference.

"Both these guys skated through the game pretty quickly, but it seemed like, once again, toward the end, our at-bats got a little bit better," Melvin said. "We've got to find a way to have good at-bats from the first pitch on and put pressure on somebody early that it doesn't take its toll on you and the pressure mounts as the game goes along and it gets tougher to relax."

When asked whether he would have liked to start the ninth inning for a complete game, Webb said there was no chance he could have gone out to finish the game. He stranded two baserunners in the eighth inning when he struck out pinch-hitter Adam Rosales to end the inning.

"That eighth inning kind of drained me out," Webb said. "I worked hard to put the zero up on the board. I felt comfortable with Lyon coming in, and I was leading off that inning too. With Sally getting that triple, it ended up working out for us real well."

Webb said he probably had his worst changeup of the season, but it worked for him.

"They weren't swinging too much at it," he said. "When I had to, I got a big strikeout there in the eighth inning with it, but overall it was mainly fastballs."

The D-backs were unfazed by a poorly pitched ninth inning, because, for the first time since Sept. 3, they were back in the win column.

"That's the only thing that matters," catcher Chris Snyder said. "It doesn't matter how we got there. It doesn't matter what happened. As long as we have more runs than they did in the end, that's all that matters."