NEW YORK -- Motivation is where you find it. And the Mets haven't always had a handle on it this season, particularly when the team in the other dugout hasn't been an especially formidable foe. If anything, these Mets have been more perplexed by the have-nots than the have-lots. So when the schedule obligated them to confront the unremarkable Giants on Tuesday night, there was a sense that disappointment could follow their three straight victories against the Phillies.

What followed, though, was an engagement against Tim Lincecum, the right-handed pitcher with an Orel Hershiser delivery, a Sandy Koufax record and an adolescent face. The Mets found sufficient challenge in Lincecum and all he brought with him. "He," Brian Schneider said, pausing, "made us play better."

As did Mike Pelfrey. The Mets had an alternate means of motivation. Pelfrey was the primary force in their victory. On a night when the Mets saluted their one-time Shea Stadium co-tenants, the Jets, they defeated the Giants by a football score, 7-0, and it was Pelfrey who emerged with stars on his helmet.

Pelfrey gave the best performance of his young career -- one consistent with the expectations surrounding Lincecum -- and enabled to Mets to avoid another three-and-out. They had won three in a row on four occasions prior to winning in Philadelphia on Saturday, Sunday and Monday. In three of those instances, the Mets hardly distinguished themselves in the ensuing game.

But this victory, the third in four games against the Giants, created the Mets' second winning streak of at least four games and sheared another game off their deficit in the National League East. Their record now two games over .500 for the first time in five weeks, the Mets leapfrogged the Marlins for second place and are merely 1 1/2 games behind the first-place Phillies, closer to the lead than they have been in 50 days, six games closer than they were 25 days ago.

"We're back to where I think most of us thought we'd be," Schneider said. "Close. We've started playing pretty much the way we expected. It's taken us a while to get it going. And, yeah, we're real lucky that no one else ran away with it."

Schneider had directed Pelfrey's fifth straight victory, guiding him through seven innings, deciding which pitches -- the four-seem fastball, the two-seam "bowling ball" or the cameo-appearance curveball -- to use to defuse the Giants.

Though hardly as celebrated -- or successful -- as Lincecum, Pelfrey clearly outpitched him. For the second time this season, he held his opponent scoreless for seven innings. But this time, he surrendered merely three hits -- all singles -- and two of three never reached the outfield. And for the first time in 34 career starts, Pelfrey (7-6) walked no one.

He overcame an error and an umpire's poor call on the bases in the first inning and then buried the Giants, who, despite their now 39-51 record, have been a contentious opponent for nearly two months. He retired 19 of his last 21 batters.

While he restricted the Giants' modest offense, Lincecum was uncharacteristically infective, surrendering a three-run home run to Carlos Beltran in the first inning and a solo home run to Carlos Delgado in the sixth. Lincecum (10-2) lost for the first time in his past 13 starts. He had won his past six decisions.

"I know I had to pitch well to give my team a chance," Pelfrey said. "We've been scoring a lot for me [45 runs in his past five starts], but you don't expect to get a lot of runs against as pitcher as good as [Lincecum] is. They did a great job scoring early. It made it a lot easier.

Lincecum had allowed two runs in the first innings of his 17 previous starts. The Mets scored three before he had faced five batters. A one-out single by Endy Chavez and a walk to David Wright preceded the 250th home run of Beltran's career and his 14th this season.

The Mets, who had 14 hits -- they've had at least 10 in eight of their past 10 games -- had baserunners in every inning but one before Delgado hit the 447th home run of his career and his 16th this season. The first baseman has eight home runs on 23 hits since June 23.

The Mets scored twice in seventh, as well, and Fernando Tatis hit his third home run in the ninth. They have hit three home runs in a game four times this season.

But this baseball evening belonged to Pelfrey, who even had a hit. He put his record over .500 and his ERA under 4.00 and 3.93. It hadn't been lower than 4.00 since his third start on April 20. He threw his curveball -- the pitch former coach Rick Peterson had him abandon two years ago -- four times and the results were mostly favorable.

"Everything is getting better across the board," Pelfrey said. "All my pitches."

As well as his teammates' perception of him.

"Now we feel like we're going to win when he's out there," Schneider said. "He's come on so fast. You knew he had talent, but he was having trouble getting to it. Then, boom. There were two pretty good young pitchers out there tonight. And Mike Pelfrey was the better one."