With the Giants' victory, the top two teams in the NL West have split the first two games of their three-game series, with Arizona's lead slipping back to 2 ½ games.
Hernandez allowed two hits a bunt single by pitcher Omar Daal and a double by Luis Gonzalez. Hernandez struck out five and walked five. John Johnstone and Alan Embree pitched the eighth inning for the Giants, then closer
Robb Nen pitched the ninth for his 24th save in 30 opportunities. He walked the first two batters. After a sacrifice bunt, Nen struck out pinch-hitter Bernard Gilkey and got Tony Womack to ground out.
Daal (10-6), who allowed just two hits in the first seven innings, retired the first two batters in the eighth, the second on Steve Finley's leaping catch of pinch hitter Stan Javier's deep fly ball at the center field wall.
But Daal hit F.P. Santangelo with a pitch and Bill Mueller reached first on a bunt single, then Hayes hit a 1-0 pitch into the left-field seats to put San Francisco ahead 3-1. Hayes is well remembered by Diamondbacks' fans for charging the mound to swing at pitcher Todd Stottlemyre last April 16 igniting a bench-clearing melee.
It was Hayes' third home run of the season.
Daal gave up five hits in 7 2-3 innings. He struck out six and walked two. Daal retired the first 13 batters he faced.
Hernandez held the Diamondbacks without a hit until the fifth inning, when Daal reached safely on a two-out bunt, his fourth bunt single of the season.
©1999 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed