SAN FRANCISCO -- After watching his team strand 10 baserunners, including six in scoring position, Philadelphia Phillies manager Ryne Sandberg refused the temptation to lament all the missed opportunities Sunday.

Rather, he chose to give credit to the guy who created all those chances -- San Francisco Giants right-hander Tim Lincecum.

"He doesn't give in," Sandberg said of Lincecum, who staggered through five innings before getting 12 outs of overpowering shutout assistance from four relievers in the Giants' 5-2 victory over the Phillies. "He keeps throwing that changeup. It's a good one. He makes you swing at it."

The Giants took two of three games from the Phillies and recorded their first home series win since July 11-13. San Francisco also won the season series from Philadelphia, 5-2.

After the Phillies put 11 runners on base against Lincecum (10-8) in the first five innings, left-hander Javier Lopez and righties Jean Machi, Sergio Romo and Santiago Casilla combined to strike out nine while permitting only two singles and no walks over the final four innings.

Casilla earned his 10th save.

"They picked me up when I needed it," Lincecum said.

Red-hot left fielder Michael Morse had three hits and scored twice, and rookie catcher Andrew Susac added two hits, including one that drove in the eventual difference-making run for the Giants, who hadn't recorded consecutive home wins since June 7-8.

The Giants gave their bullpen some breathing room with two sacrifice flies in the eighth inning to open a 5-2 lead. However, the biggest offensive play of the game for San Francisco came in the second, when shortstop Brandon Crawford lined a single to right field with two outs and runners on first and second.

Phillies right fielder Marlon Byrd conceded the run to Morse and elected to shoot for Susac at third, but the strong throw got away from third baseman Cody Asche, allowing a second run to score. That put the Giants up 2-1.

Morse reached base all three times he came to the plate, extending his streak to a career-best nine consecutive plate appearances.

"I don't know. I'm getting hits," Morse insisted, shrugging off a series in which he had three singles, two doubles, a triple, a home run and two walks. "I try not to do too much. Just try to get on base and trust the guy behind you."

Crawford hit one of the sacrifice flies in the eighth, giving him two RBIs in the game. Second baseman Joe Panik added two singles before dislocating the pinky finger on his left hand. Postgame X-rays were negative.

The win didn't come easily for Lincecum, who battled traffic on the basepaths for five innings.

The Phillies scored single runs off the two-time former Cy Young Award winner in the first and third, but they stranded a total of five runners in those innings. They left runners on second and third in the second inning, and they also had at least one baserunner in the fourth and fifth.

"It does get difficult at times," Lincecum said of days when he struggles, "but you dig deep. In those tense situations, just focus. (Count upon) the belief and the will behind each pitch."

Lincecum somehow found a way to hold the Phillies to just the two runs in his five innings. He allowed seven hits and four walks while striking out two.

Second baseman Chase Utley drove in Philadelphia's first-inning run with a triple. Lincecum walked Asche with the bases loaded in the third.

Center fielder Ben Revere, who had four hits Saturday, added three more -- all singles -- in Sunday's loss, which was the Phillies' fourth on their just completed five-game California swing.

"The key hit, the big extra-base hit ... they've been hard to come by," Sandberg said. "We couldn't quite get the runs in."

Starting pitcher David Buchanan (6-7) took the loss. He gave up three runs (two earned) on nine hits and a walk in 6 2/3 innings. He struck out four.

NOTES: Opponents hit .368 (35-for-95) in Giants RHP Tim Lincecum's past five starts. ... Phillies 2B Chase Utley's triple was the 10th of the season allowed by Lincecum, the most given up by any pitcher in the majors. ... Utley extended his hitting streak to seven games. ... The nine strikeouts recorded by Giants relievers were a season best. ... The Phillies announced they acquired 2B Jesmuel Valentin as one of two players to be named later when they dealt RHP Roberto Hernandez to the Los Angeles Dodgers earlier this month. The 20-year-old son of former major-leaguer Jose Valentin was hitting .282 with seven home runs and 24 steals in Class A. ... RHP Sean O'Sullivan cleared waivers and accepted an assignment to the Phillies' Triple-A Lehigh Valley affiliate. ... Giants C Hector Sanchez returned to San Francisco after experiencing dizziness when hit in the facemask with a foul tip in a rehab start for Triple-A Fresno on Saturday night. Giants manager Bruce Bochy said Sanchez, who is on the disabled list after sustaining a concussion July 25, would undergo further tests.