Backed by an offensive effort in which every Giants starter reached base, Cain improved to 15-0 on the year when receiving three or more runs of support, with the Giants now 18-2 in such games started by Cain. The outing was his fourth straight in which he allowed two runs or fewer, and he has allowed more than two runs just once in his last nine starts.
"Tonight he really had command of all his pitches and pitched efficiently," manager Bruce Bochy said. "He had seven strong innings and he could have kept going, but that was about as far as we wanted to get him."
After combining for nine walks in his last two starts, Cain allowed just one free pass Wednesday night, yielding four hits while striking out six to give him a career-high 191 strikeouts on the season.
"The past couple starts, I was just finding ways to walk guys, and I kind of made that a point between the last start and this start just to throw a lot of strikes and get ahead a lot of guys and not even think about walking guys and take that out of my mind," Cain said.
"He was throwing strikes, getting ahead," Arizona first baseman Paul Goldschmidt said. "He was using three or four different pitches. Obviously he has a fastball, but he throws a little cutter, a slider that's a little slower than that and moves a little more, curveball as well, and he was throwing those for strikes, getting ahead and keeping us off balance."
Cain's masterful pitching came with several defensive miscues behind him, having to battle past errors from the Giants infield to start the first, third and fifth innings. Cain followed all three errors with three straight outs.
"That's what you want to do as a pitcher when funky plays happen behind you," Cain said. "Guys make errors. It's going to happen, and it's the same thing as when we make bad pitches -- we're looking for those guys to pick us up. I think we just have to put our head down and worry about getting guys out and not let an error affect anything."
Cain supported his own cause by scoring the go-ahead run in the third inning, breaking a scoreless tie after Pablo Sandoval drove him in from third with an infield single to short. Cain later knocked in his sixth run of the season when he beat out a throw from short on a sharp grounder, driving in Hunter Pence from third to increase the Giants' lead to a five-run advantage.
Angel Pagan was one of two Giants starters unable to register a hit, but, after drawing a walk, he scored on Buster Posey's line-drive single in the third inning. The RBI marked Posey's 100th of the season, making him just the third Giants catcher to drive in 100 runs, joining Walter Cooper (122 in 1947) and Dick Dietz (107 in '70). Barry Bonds was the last Giants player to reach 100 RBIs in a season, driving in 101 in 2004.
"It was a good feeling," said Posey, who collected the baseball from the hit when he got back to the dugout. "An accomplishment like that can't be done without your teammates -- without guys getting on base, the speed of guys on our team getting in scoring position, moving runners. It's only accomplished when you have help from your teammates."
The Giants won their first game since clinching the NL West title Saturday, avoiding a three-game losing streak, which would have been their first such streak since the end of July. The Giants have still won nine of their last 12 home games and improved to 16-7 in September.
"You just go, play and compete," Posey said about maintaining a competitive edge after clinching the division. "I think we did a nice job of that tonight. It didn't really feel any different than games before we clinched, so hopefully we can keep that going."