SAN FRANCISCO -- Having just endured the quirkiest few moments of his young career, Mike Pelfrey stomped to the back of the AT&T Park mound Sunday night and nearly toppled over.

He had just committed the third -- and least costly -- of three balks. He was already embarrassed and already angry. And now this.

"I think maybe when I get on national TV, I like making a fool of myself," Pelfrey said.

Forget the embarrassment of having 43,012 fans issue a collective "What just happened?" Pelfrey was upset mainly because two of the balks directly led to the only two runs in a 2-0 Giants win. Because of them, the Mets were denied a series sweep. And Pelfrey was left agape.

"I think I had the yips," Pelfrey said. "I don't know if you see it too much in pitchers."

Quite frankly, you don't. Pelfrey's third balk tied a 46-year-old Mets record, marking the first time any Major League pitcher had done it in 15 years -- the only difference being that when Al Leiter balked three times in a game in 1994, his Blue Jays won the game.

Pelfrey's Mets did not.

Instead, they lost their first game on this three-city road trip, silenced by Matt Cain and a Giants bullpen that bent but did not break. Perhaps they were due to lose. But not like this.

Disregarding Pelfrey's first balk, which occurred when his cleat caught on the pitching rubber, his real mental troubles began in the fifth. After allowing a single to Aaron Rowand to open the inning, Pelfrey began fighting an impulse to step off the mound as if firing a pickoff throw. His mind would not allow him to come set, an action as familiar as tying shoelaces for a pitcher.

So with one out, Pelfrey balked, advancing Rowand to second. And moments later, Cain shot an RBI single up the middle, giving the Giants their second run.

"I think he just got kind of a brain lock there, a cramp where he couldn't quite get comfortable," Mets manager Jerry Manuel said. "And they were balks. The guy was right."

"The third was the worst of all," crew chief Dana DeMuth said. "Big time."

By that time, the sixth inning, Pelfrey had become downright flustered. Again, he allowed a leadoff single, and again he balked the runner over a base. This time he fought his way out of the jam, loading the bases with an intentional walk -- which allowed him to pitch out of the windup -- and inducing Rowand to hit into a double play. But the frustrations were still mounting.

Teammates took turns jogging to the mound and talking to Pelfrey. They slapped him with their gloves, cajoled him with their words.

"You just try to give him as much confidence as you can," first baseman Jeremy Reed said. "You try to make him feel like he can think about something different."

But Reed, making his first start at first base, hardly knew what to say. He's a beginner at the position, making his second career start there because Carlos Delgado is on the disabled list. And he was part of a makeshift infield that also included -- in place of regular backup Alex Cora, who sprained his thumb and left the game -- Fernando Tatis at shortstop.

"That's new for me, trying to go and talk to a pitcher," Reed said. "I was trying to make him think of the pitch, as opposed to how to get to the pitch."

By that point, it hardly mattered. Manuel, having seen enough, lifted Pelfrey for a pinch-hitter in the top of the seventh inning, ending his starter's night after 78 pitches. And it was unfortunate -- Pelfrey was otherwise pitching a fine game, flashing one of his best sinkers of the season and not allowing the Giants to record an extra-base hit.

"I was mad," Pelfrey said. "I guess they didn't want to keep watching me [balk]. I don't know of anybody that would. They decided to take me out. I'll live with it."

In the box score, it was nothing more than a bizarre way for Pelfrey to absorb his first loss of the season. It didn't help that the Mets did not hit for him, putting five runners in scoring position with less than two outs but stranding every one of them. But Cain proved a worthy adversary, and just like that, their winning streak had ended.

Their best chance came in the eighth inning, against a shaky Giants bullpen, when the Mets loaded the bases with one out. But Manuel opted to pinch-hit Angel Pagan -- who came off the disabled list Saturday and has had precisely one big league at-bat since last May -- for Daniel Murphy.

Pagan grounded into an inning-ending double play, and the Mets did not threaten again.

"I don't think Murphy is swinging quite as well now," Manuel said. "I don't see the quick hands."

Whatever the case, a charter flight bound for Los Angeles was waiting for the Mets after the game. There, in Southern California, the Mets will aim to recover. They're still winners of 11 of their last 14 games, even if this loss left an oddly sour taste.

"You tip your cap," Pelfrey said. "And move on."