SAN FRANCISCO -- Rookie starter Wily Peralta worked into the seventh inning, rookie closer Jim Henderson recorded his first four-out save and the Brewers used a 3-1 win over the Giants on Tuesday to remind their fans that they have some pieces in place to start over next season.
"We have to finish on a positive [note] for the next year," said another of those pieces, All-Star center fielder Carlos Gomez, whose second-inning home run provided a lead that would hold. "We still have 50 games to play, and it's really important if ... the young guys like Peralta and young guys in the bullpen have confidence to put into next year.
"If we put it together, we can be a good team."
Peralta and Giants starter Matt Cain carried identically disappointing 4.57 ERAs to the mound on a cool night at AT&T Park but pitched to a much higher level, Cain allowing two earned runs in seven efficient innings before a scoring opportunity forced his early exit, and Peralta allowing only one run in 6 1/3 innings for his first victory since July 14.
The Brewers got to Cain in the second inning, when Gomez jumped a first-pitch slider for his team-best 18th home run, and in the fourth, when Norichika Aoki led off with a double and eventually scored the first of his two runs on a wild pickoff throw from Giants catcher Buster Posey.
Those two hits represented half of the Brewers' offense against Cain, who did not walk a batter and struck out six while navigating seven innings on 87 pitches.
Peralta needed 108 pitches for 6 1/3 innings and allowed a baserunner in each of the seven innings he worked. But he struck out the side in the second and did not allow a Giants runner past first base until the fifth, when he retired Marco Scutaro on a routine, inning-ending groundout to strand runners at second and third base.
Peralta found more trouble in the seventh when Brandon Belt led off with a double into the right-field corner and Roger Kieschnick followed with a single that deflected off Peralta's foot. When a groundout pushed Kieschnick to second base, representing the tying run, the Brewers called for their most reliable reliever, and Brandon Kintzler allowed Joaquin Arias' run-scoring groundout but retired Scutaro on a flyout to preserve a 2-1 lead.
The Brewers practiced more damage control in the eighth inning after Brandon Crawford led off against Kintzler with a double. Rob Wooten -- the closer at Triple-A Nashville only two weeks ago -- took over to face Hunter Pence, who advanced the runner with a lineout to right field, and Posey, who grounded to a drawn-in infield.
Enter Henderson, who had not recorded more than three outs in any of his previous 79 appearances in the Major Leagues. He induced a popout to shallow left field from Pablo Sandoval, then pitched around a two-out walk in the ninth for his 16th save this season.
It may not have been the ideal bullpen formula for Brewers manager Ron Roenicke, who figures to be active Wednesday with right-hander Marco Estrada returning from the disabled list after throwing only 47 pitches in his most recent Minor League rehab start.
"We wanted to win that ballgame," Roenicke said. "We were going to do whatever we needed to do to win it. If we have a chance to win games, we'll try to do it, and then we'll figure it out the next day."
Henderson's 25th pitch was a 98 mph fastball to Arias, who swung through it to end the game.
"Last time I tried to go more than three outs, I failed," said Henderson, referring to a 10-inning loss at Houston last Aug. 11. "I want to prove that I can do that, help the team any way I can, whether it's four outs, five outs, six outs. That was a goal in the offseason for me, to come in and be able to do something like that and help my future in the game. Closers come and go, and at some point you're going to have to throw more than three outs."
The Giants were 1-for-9 with runners in scoring position, including 1-for-8 over the final three innings. They are 2-for-22 with runners in scoring position through the first two games of this four-game series.
"We're getting the right guys up there -- and they're not always going to do it, we know that -- but it's kind of hit us as a club as a whole," Giants manager Bruce Bochy said. "And it's been here for a while."
Henderson preserved a welcome win for Peralta, who allowed only one run in his first four starts in July but finished the month with a pair of duds, allowing eight earned runs in 8 2/3 innings of losses to the Rockies and Cubs.
"I feel good. I think I needed an outing like that," Peralta said. "I was really struggling those last two."
"I know he got in trouble there the last inning," Roenicke said, "but his fastball was down in the zone with great life, and he's really starting to like the slider and the changeup to the point where he's mixing it into his arsenal more often. Anytime he can do that, with the fastball he has, he's going to be tough to hit."
The Brewers avoided falling back to 19 games under .500, which would have matched their low point this season. Instead, they improved to 48-65.
"Fantastic -- tonight was a night that everybody picked each other up," Henderson said.