Jose Mesa helped the Mets walk to another win.
The Mets, whose relievers blew a four-run lead in the eighth inning by giving up two three-run homers, rallied with a run in the eighth and two in the ninth.
" We never felt down," said Luis Lopez, credited with a game-winning RBI when he was walked by Mesa. "That shows you the chemistry on this club -- the enthusiasm and the desire to win."
John Olerud hit one of four home runs by the Mets, who moved within 2 1/2 games of the idle Chicago Cubs in the NL wild-card race.
"We had trouble keeping them in the ballpark today," Giants manager Dusty Baker said.
Despite dropping two of three to the Mets, San Francisco finished its 10-game road trip 6-4.
"A great road trip turned into a really good one," Baker said. "You'd rather have great, but really good was what it was."
With New York trailing 8-7 in the ninth, Olerud singled leading off against Robb Nen (7-3), and moved to third on pinch-hitter Matt Franco's single to right. Brian McRae's single scored Olerud to tie it 8-8 as Franco took thid.
Lenny Harris was walked intentionally to load the bases, and Baker brought in Mesa, who walked Harris with the bases loaded on Tuesday to hand the Mets a 7-6 win in 10 innings.
Mesa fell behind 2-0 to Lopez before walking him on a 3-1 pitch.
"Luis went up there very cool and calm and knew what he had to do," Mets manager Bobby Valentine said. "I think it was a great game."
Turk Wendell (4-0) pitched out of a bases-loaded jam in the ninth for the win.
Kent's homer off Dennis Cook brought the Giants within 6-5, and Hayes, batting for reliever Alvin Mormon, connected with two outs in the eighth off Greg McMichael.
The Mets bullpen has blown 19 of 44 save opportunities.
"Our hitters are showing the bullpen that until they right themselves, they're right there with them," Valentine said.
The Mets closed within 8-7 in the eighth on pinch-hitter Jorge Fabregas' RBI groundout.
Fabregas, acquired from Arizona on July 31, marvels at how the Mets continue to come back.
"I don't think we're ever out of a game," he said. "I've never seen anything like it. There's so much energy in the clubhouse and so much energy on the field. There's one goal and that's to win. Everybody's picking up each other. That's what I love about this team."
Tony Phillips, Edgardo Alfonzo and McRae added homers for New York. Olerud extended his hitting streak to 20 games, tying him for the fourth-longest streak in Mets history.
Trailing 6-2, Marvin Benard singled and Barry Bonds doubled off starter Mets starter Masato Yoshii to start the eighth before Kent hit his 16th homer to right-center off Cook.
Cook got two outs before Rich Aurilia singled and Brent Mayne doubled. McMichael came in and Hayes hit his third career pinch-hit homer.
Yoshii, winless since May 27, gave up four runs and seven hits.
Giants starter Orel Hershiser allowed four runs and 10 hits in six innings.
Alfonzo hit a three-run homer, his seventh, in the fifth inning to put the Mets ahead 3-2. McRae's homer leading off the sixth gave the Mets a 4-2 lead.
Phillips, acquired from Toronto on July 31, hit his first NL homer in the seventh, putting New York up 5-2. Olerud's one-out shot in the seventh off Mormon gave the Mets a four-run cushion.
© 1998 SportsLine USA, Inc. All rights reserved