SAN FRANCISCO (AP) The pain in Matt Cain's right elbow is no longer an issue. Being more efficient with his pitches is the next step toward putting him back on track.
Considering what Cain has been through the past nine months, he'll take the baby steps of steady improvement.
Cain pitched four effective innings, Buster Posey hit his first home run of the spring and the San Francisco Giants beat the Oakland Athletics 4-0 on Friday night.
Cain entered with an 8.22 ERA but was mostly sharp in his first game at AT&T Park since July 9. The three-time All-Star, who missed the second half of 2014 following elbow surgery, allowed three hits, struck out three and walked two.
''That felt really good to be back in this energy, back in front of the crowd,'' Cain said. ''I felt strong, even at the end of it, which was good. I just have to cut the pitch count down to be able to get a little deeper in games.''
Cain got just enough support from Posey, with a little boost from Oakland's defense.
The A's committed two errors in the first inning before Posey hit a first-pitch homer off starter Kendall Graveman, who gave up only one other hit and lowered his spring ERA to 0.36.
Joaquin Arias added a pinch-hit RBI single in the sixth for San Francisco.
The win was just the 12th of the spring for the Giants, but it came on a day when manager Bruce Bochy was given a three-year contract extension through the 2019 season.
Keeping Bochy was a critical move for a team that has won three World Series championships in the past five years. Getting a strong outing from Cain was just as important.
Cain pitched with runners on base in his first three innings but escaped each time without allowing a run. He worked out of two-out, two-on jams in the second and third, then tossed a perfect fourth.
''I thought he looked good,'' Bochy said. ''He had a couple long-pitch innings, but he got through that fine. He was throwing free and easy, pain-free. That's a good sign.''
Graveman was equally sharp but took the loss, his first of the spring, as Oakland's eight-game winning streak ended. The right-hander struck out six, walked three and retired six of his final seven batters.
Graveman took a scoreless streak of 16 1-3 innings into the game but didn't get much help from the A's infield. San Francisco leadoff batter Nori Aoki reached on shortstop Marcus Semien's error, and No. 3 hitter Angel Pagan was safe when second baseman Eric Sogard bobbled his grounder.
Posey followed with his home run to center. The Giants' catcher had driven in only four runs this spring before his three-run shot put San Francisco up 3-0.
''That's a situation where I've got to pick up the defense,'' Graveman said. ''Somewhere I've got to make a pitch there to Posey. I can't give that up. That's on me.''
Athletics: RHP Jarrod Parker reached 93 mph in his latest workout and is scheduled to pitch an intrasquad game next week for Class A Stockton. Parker missed last season following Tommy John surgery. ... RHP A.J. Griffin, who also had elbow surgery, is two to three weeks behind Parker in terms of rehabbing, according to manager Bob Melvin.
Giants: Travis Ishikawa (back) recently began swinging a bat again, but the team will wait until Saturday to determine whether he'll start the season on the disabled list.
Athletics: LHP Drew Pomeranz, who beat out Jesse Chavez for a spot in the rotation, starts the spring finale against San Francisco on Saturday.
Giants: RHP Tim Hudson makes his final exhibition start against Oakland on Saturday.