SAN FRANCISCO (AP) In the age of sabermetrics, pitcher wins aren't supposed to matter.
Don't tell that to Matt Cain - he savored every minute of his first victory in 10 months.
''When you haven't had one in a year, it's pretty nice to have,'' Cain said.
Cain pitched six strong innings and helped himself with the bat, Buster Posey added a two-run homer and the San Francisco Giants beat the Chicago Cubs 5-3 on Saturday.
Cain (1-5) got his first victory since July 22, 2015, snapping a streak of 15 consecutive winless starts. The Giants were 3-12 over that stretch.
''You want to go out there and give your team a chance to win,'' Cain said. ''When your team wins, it's great, but it's also nice to have one when you haven't had one in a long time.''
The Giants won for the ninth time in 10 games and the Cubs fell to 2-3 on their nine-game road trip.
Cain had surgery to remove bone chips in his elbow in 2014, and then did stints on the disabled list in 2015 for a flexor tendon strain and elbow nerve irritation.
He has thrown three straight quality starts for the first time since 2014 (June 28 to July 9).
''I know it's got to be a weight off his shoulders because it's been talked about quite a bit,'' Giants manager Bruce Bochy said.
Cain's resurgence coincided with Jon Lester's worst start of the season. Lester (4-3) allowed five runs on six hits and three walks.
''It's unusual,'' Cubs manager Joe Maddon said. ''Jonny had a tough day. It just didn't go his way. The bullpen was fantastic and gave us a chance to win. We had a couple of opportunities to score.''
Cain entered with the worst run support in the majors (1.96 runs per game) and took matters into his own hands, crushing a 3-2 fastball over center fielder Dexter Fowler's head for a two-out, two-run double in the bottom of the second.
''I think I probably just got lucky and ran into one there, but it was definitely nice to go out there and give the guys a good chance to get a win, especially going against a good guy like Lester,'' Cain said.
Posey hit a two-run homer to left - his fifth - during a three-run third in which the Giants chased Lester.
Cain's only mistake came in the third, when he hung a 3-2 slider to Kris Bryant. Bryant pounced, clearing the 399-foot sign in straightaway center with his ninth homer.
Fowler was 3 for 5 and homered leading off the ninth against closer Santiago Casilla, who got the next three outs for his 11th save.
Cain's double ended a drought of 46 hitless at-bats going back to May 10, 2014 (he singled off Zack Greinke, then with the Dodgers). Cain was 0 for 14 with 10 strikeouts this season.
Cubs: OF Jason Heyward suffered a contusion on his right side after making a diving catch in Friday's game and will be out three to five days. ... The Cubs activated OF Matt Szczur from the 15-day disabled list and designated RHP Neil Ramirez for assignment.
Giants: OFs Hunter Pence and Angel Pagan were out of Saturday's starting lineup with nagging hamstring soreness. Giants manager Bruce Bochy said he noticed Pence hobbling after hustling down the line earlier this week in San Diego and that Pence confirmed that he's experiencing soreness on his lower right hamstring. Pagan missed 11 games with a left hamstring injury earlier this month and is experiencing lingering soreness.
Cubs: RHP Kyle Hendricks (2-3, 2.45 ERA) is 1-1 with a 5.56 ERA against the Giants in two career starts. He allowed four earned runs in six innings in his only start in San Francisco on Aug. 26, 2015.
Giants: LHP Madison Bumgarner (5-2) is coming off a complete-game performance in which he struck out a season-high 11 batters and allowed no walks during a 5-1 victory at San Diego. The three-time All-Star is 3-0 with a 1.95 ERA in his last four starts against Chicago.