SAN FRANCISCO (AP) " Jonathan Sanchez pitched into the seventh inning, Andres Torres homered and the San Francisco Giants beat the Arizona Diamondbacks 2-0 on Friday night to end a six-game losing streak.
Sanchez (1-1) allowed just two hits and struck out four in 6 2-3 innings to pin another difficult loss on Dan Haren. Sanchez walked four but didn't allow a runner past second base.
Jeremy Affeldt, Bob Howry and Brian Wilson finished the three-hitter. Wilson recorded the final four outs for his first save of the season.
Haren (0-3) struck out six and allowed just one run in six sharp innings, but remains winless in three starts. The Diamondbacks have been shut out twice this season, both times with the hard-luck right-hander on the mound.
Bengie Molina singled in Pablo Sandoval with two outs in the fourth and Torres hit his second career home run leading off the eighth for the Giants, who returned to AT&T Park after going 0-6 on their first road trip of the year.
San Francisco struggled offensively during the trip and didn't exactly break out of the hitting slump against the Diamondbacks.
Sanchez, who was knocked out of his previous start after giving up five runs in 4 2-3 innings against San Diego, allowed a double to Felipe Lopez leading off the game and a two-out double to Justin Upton in the seventh but that was all.
He struck out Chris Young with two on to get out of the first, then kept the Diamondbacks off balance with a fastball that still registered 90 mph in the seventh. He walked Chris Snyder after Upton's double but Affeldt got Tony Clark to fly out to end the inning.
Haren also was effective. He allowed just one hit through three innings and faced the minimum 11 batters before Sandoval hit a two-out double down the right-field line in the fourth.
Molina followed with a sharp single to left to drive in Sandoval and Fred Lewis singled to right to put runners at the corners before Haren struck out Travis Ishikawa to end the threat.
Torres homered off Scott Schoeneweis leading off the eighth.
Affeldt and Howry kept the Diamondbacks quiet until Wilson took over with a runner at third in the eighth. The closer struck out Mark Reynolds to end the inning but walked Young leading off the ninth. Eric Byrnes then grounded into a 1-4-3 double play before Wilson struck out Upton to seal the win.
Notes: The Giants recorded their first shutout since a 1-0 win over the Dodgers on Sept. 21, 2008. ... Arizona SS Stephen Drew left in the fifth inning with tightness in his left hamstring and is day to day. ... RHP Joe Martinez rejoined his San Francisco teammates for the first time since getting hit in the head by Mike Cameron's line drive on April 9. Martinez, who suffered a concussion and three hairline fractures in his skull, has a black eye and cannot begin his rehab for at least a month but is otherwise fine. "I guess I'm lucky," Martinez said. "I'm not dizzy. I don't have any nausea. My vision's good so I'm feeling good."