For Cliff Lee it was just another game, another win that will help his team reach the postseason. There was no revenge factor, no statements.

Lee threw a seven-hitter, Hunter Pence and John Mayberry hit back-to-back home runs and the Philadelphia Phillies beat the San Francisco Giants 3-0 Thursday night.

Lee (11-7) was commanding in his first regular season start against the Giants in two years, striking out eight, including Cody Ross four times, and not walking a hitter. He set down 10 in a row at one point in his major league-leading fifth shutout this season.

"That's probably the best game I've had as far as commanding the ball," Lee said. "I was getting ahead of the hitters and staying away from the middle of the plate. I felt like I could throw any pitch at any time to any location."

It was also some revenge for Lee, who lost twice to the Giants in last year's World Series pitching for the Texas Rangers.

"That's in the past," Lee said. "We just want to win every series. Getting the first game means you're in better shape. It's August, still the middle of the season. We want to stay in a groove and keep winning."

Pence had three hits and drove in two runs and is hitting .360 (9 for 25) since joining the Phillies.

"He has come in and fit in nicely," Phillies first baseman Ryan Howard said. "He gives us energy and intensity. He's been great for our team."

Madison Bumgarner, a postseason hero for the Giants, recovered after allowing two long balls in a game for just the second time this year and the first since June 15.

Bumgarner (6-11) retired 13 of 14 following Mayberry's blast. He went eight innings, allowing six hits, walking two and striking out nine.

"The game was all about pitching and good defense on both sides," Phillies manager Charlie Manuel said. "After the two home runs Bumgarner was really good."

The Phillies, who have won seven straight since losing two in a row to the Giants in Philadelphia, remain undefeated since acquiring Pence, who homered in a Phillies uniform for the first time. Pence ended a 19-game, 67-at bat homerless drought when he connected on Bumgarner's first pitch in the second inning.

"Any time you can pick up a player like Pence you're going to be a better ball club," Giants' manager Bruce Bochy said. "He helps balance their lineup. They got the player they were looking for."

Bumgarner allowed the first three Phillies to reach in the first, but Jimmy Rollins was thrown out trying to steal third by Chris Stewart and Howard lined into a 5-6 double play.

"Lee doesn't need many runs as good as he is," Bumgarner said. "That second inning cost me I guess. The way he was throwing he looked like he could throw about 14 innings out there."

The Phillies never had more than one runner on in an inning the rest of the way.

Lee, who threw the 10th shutout of his career, made it all academic, needing just 74 pitches to get through the first seven innings and 106 overall. He sent the Giants to their sixth loss in seven games, slicing a half-game off their NL West lead over the Arizona Diamondbacks, who open a three-game series against the Los Angeles Dodgers on Friday.

"I've never seen him off, even on TV," Giants shortstop Orlando Cabrera said. "He doesn't use his curveball much. His fastball command is spectacular. His cutter has just got better. Really sharp."

Pence added an RBI single in the ninth against Santiago Casilla.

NOTES: Giants IF Mark DeRosa was activated from the 60-day DL. IF Brandon Belt was optioned to Triple-A Fresno and LHP Alex Hinshaw was designated for assignment. ... The Phillies send rookie RHP Vance Worley to the mound Friday against the Giants. He threw a three-hitter against the Giants in Philadelphia, his first career complete game. Worley has won five consecutive decisions. ... LHP Jonathan Sanchez gets his first start since coming off the disabled list. He last pitched June 24. Sanchez is 3-1 with a 2.86 ERA in five starts against the Phillies. ... Phillies RHP Ryan Madsen went on paternity leave. RHP Scott Mathieson was recalled to take his place. ... Phillies IF Chase Utley was out of the starting lineup for the first time since June 26. ... Lee is 4-0 in four career starts against the Giants. ... Giants OF Carlos Beltran is 1 for 6 lifetime against Worley. Phillies OF Shane Victorino is hitting .400 (6 for 15) against Sanchez. Jimmy Rollins is .063 (1 for 16) against Sanchez.