PHILADELPHIA -- The San Francisco Giants may not need much offense from Carlos Beltran if they play the Phillies again in the postseason.

Tim Lincecum threw six scoreless innings, Pablo Sandoval hit a solo homer and the Giants beat Philadelphia 4-1 on Thursday night in their first game with Beltran.

The All-Star outfielder was 0 for 4 with two strikeouts in his debut with the defending World Series champions, who won two of three against the major league-leading Phillies in a rematch of the NLCS.

Lincecum and Matt Cain dominated the Phillies last October, and they did so again in this series.

"Our pitchers did a great job and we got the hits when we needed," manager Bruce Bochy said. "They're a great club."

Lincecum (9-8) showed no negative effects from the stomach illness that forced him to push his start back two days. The two-time NL Cy Young Award winner allowed three hits, struck out six and worked around four walks.

"I felt fine, a little fatigued but I just tried to keep a good pace," Lincecum said.

The Phillies hadn't lost consecutive games since June 4. They went a club-record 45 straight games without dropping two straight.

Sandoval gave the NL West leaders a 1-0 lead when he led off the second inning with an opposite-field shot to left. It was Sandoval's 10th homer, becoming the first Giant to reach double digits this season. Beltran hit 15 for the Mets before he was traded to San Francisco for pitching prospect Zack Wheeler.

The addition of Beltran should bolster a sagging offense that's near the bottom in the major statistical categories. Beltran started in right field and batted third. He contributed defensively, making a sliding catch to rob Jimmy Rollins of a hit on a shallow fly in the fifth. Beltran's streak of reaching base safely was snapped at 32 games.