SAN FRANCISCO — Mike Bolsinger liked the way he handled himself in getting out of trouble in his final inning. He's still scratching his head over what happened before that.
Bolsinger gave up five runs and eight hits in five innings and the Arizona Diamondbacks fell to Tim Lincecum and the San Francisco Giants 5-0 on Friday night.
Mark Trumbo had a hit in his return to the lineup and Miguel Montero celebrated being added to the All-Star game with a double as the Diamondbacks lost for the seventh time in their last 11 games.
Pablo Sandoval homered and drove in three runs to break out of a slump that extended to late June. The Giants third baseman, hitting just .222 over his previous 16 games, also had an RBI-double and an infield single.
"The odd thing was I was feeling kind of good," Bolsinger said. "I was scratching my head because I was feeling like I was throwing good pitches. The one to Sandoval was a good pitch. He just hit it out. It was an interesting game."
Bolsinger allowed two runs in each of the first two innings and then retired eight of the next 10 hitters before running into trouble again in the fifth.
"He was leaving the ball up early and they hammered it," Montero said. "These guys like to swing early and you have to make quality pitches out of the gate. He wasn't able to do that."
Bolsinger gave up three consecutive hits to open the fifth, including Sandoval's double. He then got the next three hitters to avoid further damage.
"I can take a couple of good things out of this," Bolsinger said. "My change was the best it's been since I've been up and I was kind of proud of myself of getting out of that last inning. As easy as it is to throw three good games in a row, there's two bad ones."
Bolsinger struck out five and walked two but is winless since April 24.
Lincecum (9-5) allowed three hits over seven innings and fanned Gerado Parra to end a two-on, two-out jam in the seventh. The two-time NL Cy Young Award winner, owner of a no-hitter this season, struck out six and walked two.
Even longtime nemesis Paul Goldschmidt struggled against Lincecum. The Arizona first baseman went hitless in three plate appearances against the right-hander.
"He's got great command and he's throwing multiple pitches where he wants to throw them," Arizona manager Kirk Gibson said. "He kept the ball down. It was a good, low strike zone and he took advantage of it and shut us down."
Lincecum helped himself at the plate and recovered after stumbling over the bag while covering first base on Aaron Hill's infield grounder for the final out in the third.
Trumbo, sidelined with a stress fracture in his left foot since April 21, went 1 for 4 and grounded out to third to end the game.
"It's good to have him back in the lineup," Gibson said. "It looks like he's moving good."
NOTES: Montero was named to the NL All-Star team as a replacement for injured St. Louis C Yadier Molina. It's Montero's second All-Star selection. ... Goldschmidt, who walked and singled, has reached base safely in 31 straight games, matching his career high. ... To make room for Trumbo, the Diamondbacks optioned OF Roger Kieschnick to Triple-A Reno. ... LHP Wade Miley (4-6), Arizona's starting pitcher on Saturday, has a 3.63 ERA in seven career games against San Francisco. ... Giants RHP Ryan Vogelsong (5-6) has lost his previous three starts.