After walking Coco Crisp to open the game, Lincecum struck out the next two batters, which brought up Cespedes. He crushed an 0-1 pitch deep into the left-field picnic area for his third spring homer in his last 11 games. Since beginning the Cactus League season 0-for-11, Cespedes has hit .333 (11-for-33).
"It was just a spinning slider. It didn't break," Lincecum said of the delivery that Cespedes mashed.
Eric Sogard's second-inning RBI single widened the A's lead to 3-1 before they pulled away with three runs in the fourth.
Lincecum vanished after Sogard and Milone singled to open the inning. Oakland scored its next two runs on Dan Runzler's wild pitch and Posey's passed ball. Seth Smith's two-out single off Shane Loux generated the inning's final run.
Two of the Cactus League's most torrid hitters stayed hot. Sogard, who homered in the fifth inning, went 3-for-3 and is batting .714 (15-for-21) in his last nine games. San Francisco's Brandon Belt, who has an outside chance of winning the Cactus League's Triple Crown, homered in three at-bats and is batting .588 (10-for-17) with eight RBIs in his last five games.
Giants rookie Nick Noonan, contending for a utility infielder's job, singled to drive in a fourth-inning run. Cole Gillespie, a candidate for a backup outfielder's role, homered in the seventh for the Giants. Guillermo Quiroz, who could be San Francisco's reserve catcher if Hector Sanchez is unable to start the season, hit an RBI double in the ninth.
Oakland's Adam Rosales added a two-run homer in a five-run eighth inning.
Up next: Barry Zito, who's scheduled to start San Francisco's home opener April 5 at AT&T Park, will make his final Arizona tuneup for the regular season when he confronts the Los Angeles Angels at Tempe. Zito also faced the Angels in his initial spring outing Feb. 27 and surrendered two runs and two hits in 1 2/3 innings. He since has built up his stamina enough to work five innings, the length of his performance last Tuesday against Seattle.
Chris Haft is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.