Updated

Hunter Pence's debut in San Francisco was a Giant disappointment.

Pence finished 0-for-4 with two strikeouts, Matt Cain matched his shortest start of the season and the Giants lost to the New York Mets 2-1 on Wednesday night.

"There was a ton of excitement," said Pence, traded from Philadelphia for outfielder Nate Schierholtz and two minor leaguers a day earlier. "The fans were great out here. That's pretty cool. They were loud and rowdy. We had a pretty crazy game. Unfortunately, I didn't really get do anything."

The Mets did plenty even while most of the production never crossed the plate.

Ruben Tejada homered for the first time in almost two years to go with two singles and a walk, and Jonathon Niese scattered three hits over seven innings to lead the Mets past the San Francisco Giants 2-1 on Wednesday night.

All San Francisco could squeeze out of Niese (8-5) was a two-out homer by Buster Posey in the sixth, the All-Star catcher's 14th this season. Niese struck out five and walked two to outlast Cain (10-4) and spoil Pence's debut in San Francisco.

Cain gave up seven hits and three walks and never looked in rhythm. He struck out five in five innings to match his five-inning victory against the Los Angeles Angels on June 18.'

Bobby Parnell pitched a perfect ninth for his fourth save and New York's third win in the last four games. The NL West-leading Giants have lost six of seven.

"I couldn't find a way to throw early strikes," Cain said. "It was a constant struggle. It was a long five innings for me."

Any momentum San Francisco had from trading for Pence faded fast.

Tejada, whose two-run throwing error led to New York's 4-1 loss against the Giants on Monday night, sent the second pitch of the game from Cain into the glove of a fan standing just beyond the wall in left for his second career home run. Tejada had gone 629 at-bats since his last long ball in September 2010.

"After like two years, it's great," Tejada said. "I was waiting for the fastball. It was a great position for that pitch. I wasn't thinking homer. I was just trying to make good contact."

The Mets made contact constantly no matter who was at the plate.

They loaded the bases in each of the final three innings and came away scoreless, went 1 for 13 with runners in scoring position and left 13 runners on base.

Josh Thole scored on Jordany Valdespin's bases-loaded groundout to third base to give the Mets a 2-0 lead in the second. Cain struck out David Wright, who had three hits, to limit the damage.

Asked how many runs his team should have scored, Mets manager Terry Collins said, "About nine. We'll take two."

The 138th consecutive sellout crowd at AT&T Park — announced at 42,188 — gave Pence a long and loud standing ovation when his name was announced with two on and two outs in the bottom of the first. All the hoopla halted when the new right fielder fouled out near first base.

Pence also struck out but reached first on a wild pitch in the fourth. He grounded out to short to end the sixth and struck out looking for the second out of the ninth.

The only thing that kept San Francisco close was its defense.

Posey threw out Ike Davis going for second after Mike Baxter struck out to end the third, and the catcher tossed a perfect ball to second to catch Daniel Murphy stealing for the final out of the fifth.

Gregor Blanco also made a diving catch in the web of his glove in left-center on a slicing fly by Valdespin to end the fourth. Cain pumped his fist and several Giants waited to high-five Blanco outside the dugout after a play eerily reminiscent — and perhaps equally spectacular, minus the stakes — to the center fielder's catch that highlighted Cain's perfect game against Houston on June 13.

"(Pence) told me, 'I just got here and that was best catch I've ever seen,'" Blanco said.

The only mistake Niese made all night was crushed by Posey off the roof of the emergency ambulance parked in the left-field tunnel to narrow New York's lead to 2-1 in the sixth.

That run proved big when the Mets loaded the bases in each of the final three innings and came up empty.

Davis grounded into a double play to end the seventh. Clay Hensley began the eighth by walking the first two batters and hitting the third before Thole's swinging bunt led to a double play, getting called out by home plate umpire Dale Scott for running in the baseline when Posey's throw back to first beaned Thole in the back, Collins protest — calling it a "bad rule" but the "right call" afterward — failed.

With the bases loaded with one out in the ninth, Penny caught Murphy's comebacker and tossed to first for an easy double play, jumping and pumping his fist after giving San Francisco a shot to rally in the ninth.

NOTES: Giants OF Aubrey Huff (sprained right knee) was officially placed on the 15-day disabled list to make room for Pence on the roster. ... The Giants optioned Eli Whiteside to Triple-A Fresno after the game with fellow Giants backup C Hector Sanchez (sprained left knee) coming off the disabled list Thursday to catch LHP Barry Zito (8-7, 3.89 ERA) against RHP Chris Young (2-5, 4.58 ERA) in the series finale. ... Giants OF Justin Christian also was optioned to Triple-A fresno for reliever Shane Loux.

___

Antonio Gonzalez can be reached at: www.twitter.com/agonzalezAP