OAKLAND, Calif. (AP) -- Conor Jackson wasn't surprised to see Oakland playing small-ball against San Francisco ace Tim Lincecum in the first inning.
The way Lincecum has dominated the Athletics in the past, Jackson expected and welcomed the new philosophy of interim manager Bob Melvin .
"We don't have guys that are going to hit 50 home runs on this team so we have to manufacture runs any way we can," said Jackson, who had three hits and drove in the first run off Lincecum in Oakland's 5-2 win over the Giants on Friday night. "That's one of, if not the, best pitcher in the game so we had to figure out a way."
Lincecum (5-6) had not lost in six previous starts against the A's and pitched a complete game shutout against them earlier this season when the two teams met at AT&T Park on May 21.
With the Bay Bridge series shifted back to Oakland, though, the results were vastly different. The A's stayed patient at the plate, working into favorable counts then delivering key hits with runners in scoring position.
Oakland also took advantage of a critical throwing error by San Francisco backup catcher Chris Stewart to score on the way to beating the Giants for just the fourth time in the last 18 interleague games between the two Northern California rivals.
In doing so, the A's won their third straight - a milestone for a club that went into the night with the second worst record in the American League and played in front of only its third sellout crowd of the season.
"That was a lot of fun," Melvin said. "I kind of got caught up in watching the fans go back and forth with the chanting. Being from the Bay Area, I had to work at times to keep my mind on the game, but that's a good win for us."
Josh Willingham hit an RBI double and also scored on Stewart's throwing error, and Graham Godfrey pitched seven innings to win in just his second major league start for Oakland.
Cody Ross homered for San Francisco but the Giants couldn't overcome Lincecum's fourth straight shaky outing and a sputtering offense that continues to misfire with runners in scoring position.
"We didn't swing the bats," San Francisco manager Bruce Bochy said. "We squandered a few pretty good chances there, and with our margin for error we can't do that."
Melvin didn't think the A's would have much room for error, either. That's why Oakland's interim manager had No. 2 hitter Cliff Pennington lay down a sacrifice after Coco Crisp led off the first inning with a single.
Hideki Matsui followed with a walk, and after Lincecum retired Willingham, Jackson singled in Crisp.
"I just wanted to try to score first," Melvin said. "I've been caught with him and been beaten (by him) so many times before, so for us we just wanted to try to get a lead."
Lincecum, who didn't make it out of the fifth inning in either of his previous two starts, gave up two more runs in the third. The three runs equaled the total Lincecum gave up to Oakland in his previous five starts combined.
Godfrey (1-0) and two relievers did the rest, combining on the six-hitter.
Godfrey, roughed up for five runs and nine hits in his major league debut against the White Sox on June 10, allowed six hits and gave up both San Francisco runs. He had three strikeouts.
That was the third straight win by an Oakland starting pitcher following a 14-game stretch when the staff went 0-11.
Rookie Jemile Weeks continued his impressive showing since getting called up from the minors 10 days ago to fill in for injured second baseman Mark Ellis . Weeks had two hits to raise his average to .361, including an RBI double in the ninth when the A's scored a pair of insurance runs off Giants reliever Guillermo Mota .
It was a tough day all around for San Francisco's pitchers and came less than 24 hours after reliever Santiago Casilla gave up a winning home run to Arizona's Justin Upton in the 10th inning.
After Lincecum breezed through the second on 11 pitches, the A's got to him for two more runs in third.
Hideki Matsui walked and scored on Willingham's double when the ball hit a folded chair leaning against the wall near Oakland's bullpen. Willingham then stole third but catcher Chris Stewart 's throw sailed into left field, allowing Willingham to score easily and make it 3-1.
The three runs were the most the A's have scored off Lincecum since June 8, 2007 - his second month in the majors. Lincecum, who left after walking Coco Crisp leading off the seventh, finished with seven strikeouts and five walks.
Lincecum, who has a 7.59 ERA over four starts in June, has walked 12 batters over his past three outings and has won just once since pitching a complete game against Oakland on May 21.
Ross homered off Godfrey in the second, and San Francisco added an unearned run in the sixth when Aubrey Huff 's slow grounder rolled through the legs of shortstop Cliff Pennington .
Godfrey, called up from the minors last week after Brett Anderson went on the disabled list with elbow soreness, looked more relaxed making his first start at the Coliseum. The Oakland right-hander pitched out of a jam in the first then later made an inning-ending play in the fourth to tag out Pablo Sandoval trying to score the tying run from third on a wild pitch.
That was key because San Francisco didn't get many other chances.
Godfrey retired nine of the final 10 batters he faced after Bill Hall scored on Pennington's error. Grant Balfour pitched the eighth and Andrew Bailey worked the ninth for his third save in four chances.
Notes: Giants LHP Barry Zito allowed four runs in six innings during his latest rehab start. ... Oakland 2B Mark Ellis (hamstring) will begin a three-game rehab assignment with Triple-A Sacramento beginning Saturday. ... RHP Tyson Ross (strained left oblique) threw off a mound, an important step in his rehab. ... RHP Brandon McCarthy (shoulder blade) is scheduled to throw to hitters Saturday for the first time since early May.