SAN FRANCISCO -- Hunter Pence got a first-hand look Wednesday night at why San Francisco fans were clamoring so loudly for his acquisition, as the Giants lineup couldn't produce enough runs in a 2-1 loss to the Mets in which the Giants had their fair share of fortunate breaks.
The Giants got the Mets to strand 13 runners and escaped bases-loaded jams unscathed in each of the final three innings, but the offense could only muster three hits on the night, with Buster Posey's solo shot in the sixth inning saving them from a shutout.
"We just got shut down," manager Bruce Bochy said. "We didn't do much with the bats there and didn't create a lot of chances either. You would like to think that with the way the game was going that we'd find a way to do it, but we couldn't."
An uncharacteristically off-target Matt Cain was far from his dominant self, but still held the Mets in check for five innings, allowing two runs on seven hits and three walks.
"I felt fine in the bullpen, but for some reason I went out there and it all changed," Cain said. "I just battled myself the whole time. It was a long five innings for me."
The go-ahead play came on Cain's second pitch of the game, when Ruben Tejada opened the game by drilling a home run to left field for his first career leadoff home run.
"It was a pitch in and it wasn't a terrible pitch," Cain said. "He just put a good swing on it."
The Mets got another run in the second when Jordany Valdespin grounded into a forceout with the bases loaded to score Josh Thole from third.
Bochy had George Kontos warming up in the bullpen in the top of the third after Cain opened the inning by walking Ike Davis and Daniel Murphy. Cain got out of the jam by striking out Jason Bay and Mike Baxter, with Posey ending the inning by throwing out Davis at third base. Cain's pitch count was at 71 pitches through three innings and finished at 97 pitches in five innings, matching his shortest outing of the season.
"He was battling himself out there, but that's how tough he is and how competitive he is," Bochy said. "Two runs in five innings, that's not bad considering the pitches he threw, and he gave us a chance."
Cain was bested by Mets starter Jon Niese, who struck out five batters in seven innings. Pence's debut wasn't enough to spark the Giants, with the newly acquired two-time All Star going hitless in his four at-bats.
"We didn't do what they brought me here to do, but it's only one game," Pence said.
After the Mets loaded the bases with no outs in the eighth, Thole hit a grounder to first, which Brett Pill fielded to throw Murphy out at home. On Posey's ensuing throw to first, the ball caromed off Thole's shoulder and bounced way out of play with Bay coming around to score. But the umpires ruled that Thole was running inside the basepaths, calling him out and sending Bay back to second base because it was a dead ball.
After Justin Turner walked, a diving Ryan Theriot got Tejada out on a grounder to end the rally.
"That's a bad rule," Mets manager Terry Collins said of Thole being ruled out. "Unless they put first base outside that line, that's a bad rule. Because sooner or later, you've got to come inside that line or else you're going to break your leg."
The Giants kept their one-game lead over the Dodgers with Los Angeles' 4-0 loss to the D-backs, who are now 2 1/2 games behind the Giants.
"It's a tough one to lose because we were dodging bullets all night," Bochy said. "We were fortunate to be in that game."
Jay Lee is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.