The Philadelphia Phillies had the chance to build a nice lead in the first inning just the way they did against Tim Lincecum a night earlier.

San Francisco even committed two errors to provide an opportunity, yet the Phillies missed.

Madison Bumgarner outdid Joe Blanton (1-2) and backed up his new contract with a second consecutive win, and the Giants beat Philadelphia 4-2 on Tuesday night.

"Our guys know what they have to do," manager Charlie Manuel said. "We've just not been able to generate enough offensive action when we have to. We have to play better and play consistent, that's all."

Buster Posey stole his first base, allowing the Giants to check off yet another milestone in his return after last year's season-ending left leg and ankle injury from a collision at the plate with the Marlins' Scott Cousins.

"I think he surprised all of us," manager Bruce Bochy said. "He knows if they forget about him, he can go. I think he thought he was moving faster than he was on that stolen base. He made a nice slide to avoid the tag."

It was a close play at third in the fifth in which he appeared to get his left hand under Placido Polanco's glove and touch the bag before the tag was placed. Polanco argued and Manuel came out as well but replays showed Posey safe.

"I did feel like I got in there," Posey said. "I didn't really walk into it as much as I wanted to."

Melky Cabrera hit an RBI triple, Nate Schierholtz had three hits and drove in a run, and Pablo Sandoval doubled leading off the fifth to extend his hitting streak to start the season to 11 games.

Bumgarner (2-1), pitching a day after receiving a new $35.56 million, six-year contract, gave San Francisco a shot at a third straight series victory.

"We got half the job done. We got guys out there," Blanton said. "We just have to get them in. That's part of the game, too."

The finale Wednesday night for an expected sellout at AT&T Park is another highly anticipated pitching matchup: San Francisco's Matt Cain and Phillies ace Cliff Lee.

Hunter Pence hit a solo home run into the left-field bleachers leading off the fourth for the Phillies.

Bumgarner allowed seven hits and two runs in six-plus innings, struck out two and walked one. Then, the Giants' bullpen did the rest, — a nice boost considering bearded closer Brian Wilson is expected to undergo elbow ligament surgery and miss the season. Clay Hensley and Sergio Romo each pitched a scoreless inning, then Santiago Casilla finished for his first save in as many chances since Wilson went down last week.

"Our staff is well armed to pitch in whatever situation when called upon," Romo said. "We're not really fazed by it."

Pagan led off the first with a single, then Cabrera tripled to end an 0-for-12 stretch and the ball stopped under the bullpen bench in the deepest corner of right field. Sandoval's RBI groundout brought home Cabrera for a 2-0 lead. Posey followed with a bloop single to center. Pagan hit his third triple of the year in the second.

The Giants missed a chance to add on when Brandon Crawford struck out with the bases loaded in the seventh. He was the lone San Francisco position player without a hit.

The typically sure-handed Giants shortstop also committed a fielding error to start the game, allowing Shane Victorino to get aboard. Then, Victorino advanced on another error — a low throw that Crawford couldn't contain for an error on Bumgarner.

But Jimmy Rollins grounded into a double play and Bumgarner retired Pence on a high popup to first baseman Aubrey Huff just behind the mound to escape unscathed. Carlos Ruiz had a sacrifice fly in the sixth for Philadelphia's second run.

"We couldn't get it done. The first inning kind of hurt us. We couldn't deliver," Manuel said.

Before the game, Manuel had a message for San Francisco's fans: Don't freak out about The Freak's latest funk. Two-time NL Cy Young Award winner Tim Lincecum is 0-2 with a 10.54 ERA after three rough starts so far.

"If they panic and they don't want him they can always send him over here," Manuel said with a grin. "Matter of fact, I'll walk over and shorten the way over here. I might pick him up and carry him. We'll give 'em what they want."

NOTES: Former Giants and Phillies OF Pat Burrell threw out the ceremonial first pitch. He is now scouting for San Francisco, but will sign a one-day minor league deal with Philadelphia next month to retire with the Phillies.