PHOENIX, July 23 (UPI) -- Matt Cain allowed three hits and struck out nine over eight innings Thursday, carrying the San Francisco Giants to a 3-0 victory over Arizona.
Cain (8-8) gave up a single and issued a walk in the first inning, worked his way out of that jam, and then gave up just one hit over the next six frames.
Buster Posey singled in a run in the first, Andres Torres hit a solo homer in the third and Aaron Rowand finished the scoring by driving in Juan Uribe with a base hit in the seventh.
Brian Wilson struck out one during a perfect ninth to pick up his 27th save.
San Francisco won for the 12th time in 15 games, but the Giants have only a 12-21 record against division opponents.
The loss went to Rodrigo Lopez (5-9), who surrendered all three runs on five hits in seven innings. Arizona was coming off a three-game sweep of the New York Mets, following a four-game losing streak.