SAN FRANCISCO -- The slumping Arizona Diamondbacks might be playing themselves right out of the NL West race -- and Cy Young candidate Tim Lincecum put another dent in their effort to get back on track.
"He was something special," Arizona's Miguel Montero said of Lincecum.
Lincecum had a shot to finish this one but loaded the bases with one out in the ninth, giving way to Alex Hinshaw and a standing ovation following his 127-pitch gem.
"To say the least, it would be nice to finish one out," Lincecum said. "But if I don't, it's no big deal. The team is winning."
The Diamondbacks have lost seven of nine and fell out of first place during the weekend when they were swept by the Dodgers. Arizona remained 1½ behind the Dodgers in the NL West because Los Angeles lost 4-0 to San Diego.
"We have struggled the last two weeks, but nobody has broken away," D-backs manager Bob Melvin said. "It's still up for grabs."
Bruce Bochy has come to expect the chorus of boos he gets whenever he has to take Lincecum out of the game.
San Francisco's skipper got a healthy dose of them this time despite Lincecum getting more than a fair chance at throwing his first career complete game.
"I'm a fan, I want to see him out there trying to finish it," Bochy said. "But we've got to be smart about this. This kid is human. He's not a toy. We can't just keep running him out there."
In the ninth, Lincecum allowed a one-out single to Adam Dunn and then Conor Jackson's double for Arizona's seventh hit of the game before walking Mark Reynolds. Lincecum's 8 1/3 innings were a career best.
Pinch-hitter Jamie D'Antona drove in a run in the ninth for Arizona, which scored another on an error by Hinshaw.
"We didn't have too many opportunities tonight and we haven't been scoring a lot of runs anyway lately," Melvin said. "When you get those opportunities, you have to bring your best at-bats."
The Giants got four consecutive hits off Arizona starter Yusmeiro Petit (3-5) to start their five-run third, including Molina's 12th home run and an RBI single by Pablo Sandoval that broke a scoreless tie. Dave Roberts drew a bases-loaded walk to force in a run and that was it for Petit.
Lincecum, the Giants' All-Star right-hander (16-3), reclaimed the major league lead for strikeouts at 225, ahead of CC Sabathia's 217 for Cleveland and now Milwaukee. He lowered his NL-leading ERA from 2.60 to 2.54.
Bochy went with a veteran lineup to back Lincecum and San Francisco ended a five-game home losing streak to its NL West rival. The Giants snapped a three-game overall skid to Arizona.
San Francisco batted around in an inning for the second successive day. It had a 10-run inning Sunday in an 11-6 victory -- San Francisco's most runs in a game this season.
Lincecum -- doing his best to make a bid for the NL Cy Young Award along with Arizona ace and 19-game winner Brandon Webb -- struck out the side in the second. It was the 17th time this year Lincecum has struck out the side.
"I wasn't thinking about Brandon Webb. I wasn't thinking Cy Young," Lincecum said. "It's a division game and a chance for us to catch up a little bit."
Just when Lincecum appeared to be in a bit of trouble, he came up big. Augie Ojeda drew a leadoff walk in the eighth, then Lincecum fell behind 2-0 against pinch-hitter Chad Tracy. Pitching coach Dave Righetti paid Lincecum a mound visit and Tracy grounded into a double play.
San Francisco's 11-time Gold Glove shortstop Omar Vizquel, whose playing time has diminished in the second half, turned a pretty double play in the fifth in which he made a tough stop on Ojeda's grounder up the middle, brushed his right foot along second base to get Justin Upton before throwing out Ojeda at first.
San Francisco rookie second baseman Emmanuel Burriss left the game in the top of the sixth with a strained muscle in his left side that could cost him the rest of this season. He hurt himself swinging and grimaced in pain while running out a ball after batting in the bottom of the fifth. Burriss was scheduled for an MRI exam Tuesday.
"It's tough," he said. "I had come this far and I was trying to go out with a bang. To stop short kind of hurts."
- Lincecum singled in the third for his 11th hit this year. He is 3-0 in five career starts against Arizona and pitched into the ninth for the second time in his career.
- Molina set a new career high with 82 RBI. "That means a lot to me," he said. "I wanted to do it so bad. It means I'm improving every year."
- Sandoval is batting .385 (5-for-13) with eight RBI during the first four games of San Francisco's homestand.
- Giants LHP starter Noah Lowry, out all year following forearm nerve surgery, threw another bullpen session and will soon face live hitters and report to the instructional league in Arizona. He also plans to play winter ball to get back to his top form. "I'm happy to be back on the mound," Lowry said. "It's encouraging to be doing baseball work."
- San Francisco RHP reliever Osiris Matos will be out a couple of days nursing a strained back.