PITTSBURGH -- Zach Duke is showing the form he had in 2005.
"I felt like I was on top of the ball the whole time," Duke said. "It's definitely a good feeling to go out there and get the win."
Duke (9-13) was 8-2 with a 1.81 ERA in 14 starts last season, but this season his ERA was at 5.51 July 24.
He has allowed only 21 earned runs in 67 2/3 innings since, a 2.79 ERA. Against the Brewers, he allowed two runs, five hits and two walks, pitching at least six innings for his ninth straight start.
"It was a very efficient game for him tonight," Pittsburgh manager Jim Tracy said. "He's very capable of getting groundballs. The sinker his last two outings is probably the sinker they saw around here last year. It's been very deep, and guys either swing over the top of it or rolling over it and hitting it into the ground."
Duke had won only one of his previous eight starts -- despite allowing three runs or fewer five times in than span.
"It was kind of frustrating because things have been going pretty well and I've had nothing to show for it," he said. "Tonight it was very gratifying."
Salomon Torres finished for his sixth save, allowing a two-out RBI single to Geoff Jenkins and a single to pinch-hitter Tony Gwynn Jr. Drew Anderson then pinch hit in his major league debut and struck out on a pitch in the dirt. Torres has saved the Pirates' last six wins since taking over as closer when Mike Gonzalez went on the disabled list.
"We put together some hits finally at the end but fell one short," Brewers manager Ned Yost said.
Chris Duffy had a tiebreaking, two-run single, and Jack Wilson went 3-for-4 with an RBI for the Pirates, who have won nine of 14.
Bill Hall hit his team-leading 31st homer for the Brewers, who have lost four of five and 14 of 17.
Doug Davis (10-10) gave up four runs, six hits and four walks in six innings. He had lost three starts in a row before pitching a four-hit shutout against the Los Angeles Dodgers last Tuesday.
"The walks killed me," Davis said. "Minus those, I think I had a pretty decent outing. I don't know what it was, if I was just trying a little too hard or what it was. Sometimes you don't really have your best stuff. And I didn't really have my fastball tonight."
Freddy Sanchez went 1-for-4 and dropped to second in the NL batting race at .339, one point behind Florida's Miguel Cabrera.
Sanchez hit into a run-scoring forceout in the first, but David Bell's RBI groundout tied it in the second. Wilson's bunt single scored Duke for a 2-1 lead in the third, but Hall retied the game when he homered leading off the fourth.
"I kind of beared down after that and made a commitment to myself not to make another mistakes like that," Duke said.
Jose Bautista was hit by a pitch with one out in the bottom half, Jose Castillo walked, Duke sacrificed and Duffy singled for a 4-2 lead.
"I've been through a lot this year, so to be able to come out and help the team win and have fun and put a smile on my face, that's all I can ask for," Duffy said.
The Pirates wore patches on the left side of their uniform fronts to honor late Pittsburgh Mayor Bob O'Connor, who died Sept. 1. Pittsburgh, playing its first home game since O'Connor's death, will wear the black-and-gold patches the remainder of the season. ... The Brewers did not hit a double for the first time in 30 games, snapping the second-longest streak in franchise history. ... The Pirates have been successful in 11 of their last 12 stolen-base attempts.