SAN FRANCISCO (AP) The Brewers figured they should have scored more runs against a wild Tim Lincecum. Milwaukee wound up with just enough when it mattered - and that marked quite an improvement from two shutout losses at San Diego.
Aramis Ramirez broke out of his slump with a go-ahead, two-run single in the seventh inning and the Brewers held on to beat the San Francisco Giants 6-4 on Friday night.
Jonathan Lucroy had a pair of hits and drove in two runs for Milwaukee, which needed a spark offensively while playing without injured slugger Ryan Braun.
''That's part of my job, get game-winning hits and come through in big situations,'' Ramirez said. ''We should have scored more (against Lincecum) because he was wild. It wasn't his best night.''
The Brewers jumped on the two-time NL Cy Young Award winner in the first inning, then rallied against San Francisco's shaky bullpen to send the Giants to their fourth straight loss, all at home.
Norichika Aoki and Rickie Weeks each hit a one-out single off loser Clay Hensley (1-3) and both advanced on Corey Hart's flyout to deep center. Ramirez then snapped a 2-for-19 skid and put Milwaukee ahead 6-4.
''We didn't play good the last two games in San Diego, but this is a new series,'' Ramirez said.
Kameron Loe (2-0) got two outs in the sixth and John Axford finished for his sixth save in six opportunities.
Lincecum lasted five innings and continued to struggle with his control. He allowed only two hits and had four strikeouts but walked four. Since the start of the 2011 season, the All-Star right-hander leads the NL with 103 free passes.
The sellout crowd of 41,082 didn't get a chance to boo Braun. The reigning NL MVP sat out to rest the sore right Achilles that forced him out in the sixth inning of Wednesday's game at San Diego.
San Francisco has its first four-game skid since Sept. 22-25 last year - and its first at home since dropping four in a row from Sept. 3-10 last year. The Giants were swept by the Miami Marlins, losing all three by one run.
This game was decided well after Milwaukee's Zack Greinke outpitched his fellow 2009 Cy Young Award winner, and neither starter earned a decision.
''The offense had been sputtering, and we came to life,'' Giants manager Bruce Bochy said. ''We found a way to get some big hits.''
San Francisco came back with three runs in the sixth to chase Greinke, who allowed three straight hits before Angel Pagan was called out on a close play at first. Pagan appeared to touch the bag with his left foot and beat the throw to Travis Ishikawa.
Pagan fumed and was held back and escorted away by first base coach Roberto Kelly as Bochy scurried out to argue with umpire Ed Rapuano.
The Giants tied the game at 4 when Brandon Belt reached on an error as the ball got under the glove of a lunging Weeks at second base.
On another close play three batters later, Emmanuel Burriss barely beat out an infield hit, though replays appeared to show he was out. Pagan clapped and cheered from the dugout as Brewers manager Ron Roenicke ran out to let Rapuano have it. Neither manager did enough to get ejected.
The Brewers settled down to regain the lead the next inning.
Lucroy hit a two-run single in the first to give Greinke an early cushion he couldn't hold. Lincecum dug himself a quick hole.
The right-hander received a mound visit from pitching coach Dave Righetti in the first after throwing 11 of his first 13 pitches for balls, loading the bases on a walk to Ramirez. A wild pitch scored Carlos Gomez for Milwaukee's first run and Lincecum then allowed Lucroy's single up the middle.
His inning: 24 pitches, 10 strikes. He loaded the bases again in the second with two more walks, throwing 26 pitches.
Nate Schierholtz pinch-hit in the fifth for Lincecum, who recovered to retire the final 10 batters he faced.
''I'm happy with the way I was able to come out of it, but giving up three at the beginning of the game in the first inning, that's no way to put your team in a position to win,'' Lincecum said. ''I definitely take a lot of responsibility for this game, as I should. As starters we're supposed to go deep into games and I really haven't with the exception of one game.''
Greinke, the 2009 AL Cy Young Award winner with Kansas City, faced the Giants for the first time in his career. He allowed seven hits and four runs - three earned - in 5 1-3 innings.
Gomez left before the bottom of the fourth after tweaking his left hamstring. Nyjer Morgan moved from left field to center and Aoki entered in left.
The Brewers added a run on Ishikawa's suicide squeeze in the sixth against his former club.
Bochy gave struggling shortstop Brandon Crawford the night off - and perhaps Saturday, too - a day after he committed two errors Thursday.
Pagan extended his career-best hitting streak to 18 games.
NOTES: Weeks batted second for the first time this season, something Roenicke might try to get him on track. ... Former Giants pinch-hit master Ishikawa started at 1B for the Brewers and received applause from the crowd when he came to the plate in the first. Ishikawa said San Francisco offered him a contract to return but there were more opportunities to play with the Brewers.