SAN FRANCISCO (AP) -- Melky Cabrera broke a record held by Willie Mays . His manager compared him to Tony Gwynn . That's the kind of memorable May it has been for the San Francisco Giants ' newest stars.
Cabrera got his 50th hit of the month to spark the go-ahead rally and Buster Posey drove in a pair of runs to lead the Giants to a 3-1 victory over the Arizona Diamondbacks on Tuesday night.
"I've never seen anything like it," teammate Ryan Theriot said. "He hits the ball hard, he's getting a hit. He doesn't hit the ball hard, he's getting a hit. It's awesome. It couldn't happen to a better guy."
Posey drove in Cabrera with an RBI double in the sixth inning to tie the game and followed Cabrera's single in the eighth with a sacrifice fly that scored Theriot to make it 2-1 and help the Giants win for the 12th time in 18 games.
Cabrera finished with three hits to pass Mays for the most ever in May by a San Francisco player and the second most in any month - one shy of the record set by Randy Winn in September 2005. The Giants have one game left this month.
"I'm very happy I was able to equal a record of Willie Mays and maybe one day be a Willie Mays myself," Cabrera said through an interpreter.
Theriot started the winning rally by drawing a leadoff walk from Bryan Shaw (1-3), who had not allowed an earned run in his first 10 road outings of the season.
Cabrera followed with a single to right that sent Theriot to third and Posey hit a sacrifice fly to deep right to give the Giants the lead. San Francisco added an insurance run on Joaquin Arias ' forceout.
Ryan Vogelsong allowed one run in seven innings but got a no-decision for San Francisco. Clay Hensley (2-3) pitched a perfect eighth for the win and Santiago Casilla got three outs for his 14th save in 15 chances.
Cabrera, acquired in an offseason deal from Kansas City for lefty Jonathan Sanchez , leads the majors with 77 hits and 25 multihit contests just 50 games into the season.
"He reminds me of Tony Gwynn ," said manager Bruce Bochy , Gwynn's former skipper in San Diego. "That's the type of hitter he is. He takes what they give him. He doesn't try to do too much up there. He has a calmness. He doesn't panic even with two strikes. He's just a great hitter."
Cabrera scored the Giants first run after reaching on a swinging bunt with one out in the sixth against Joe Saunders .
"He's in a different dimension right now," Saunders said. "You just keep making your pitches and hopefully he hits it at somebody."
He scored on Posey's double but the Giants couldn't get any more despite loading the bases with one out. Brad Ziegler relieved and got Arias hit into a 1-2-3 double play to keep the score tied at 1.
The Diamondbacks struck first when Chris Young walked with one out in the second, moved up on a wild pitch and scored on Josh Bell 's single to center field.
They missed a chance to expand the lead after loading the bases with one out in the fourth. Vogelsong recovered to get Bell on a foul popup and John McDonald on an inning-ending groundout.
The Giants failed to capitalize on their bases-loaded chance in the bottom half as Saunders struck out Arias to strand three runners.
Vogelsong escaped a second-and-third, no-out jam in the sixth by getting Paul Goldschmidt and Bell to ground out and then striking out Saunders after an intentional walk loaded the bases. Vogelsong allowed one run and six hits in seven innings, striking out eight.
"Look, we had our opportunities to beat him and we let it go," manager Kirk Gibson said. "It's as simple as that. Not to take anything away from him, but we're much better than this."
NOTES: The Giants have no homers in their last eight home games and a major league-low six in 24 home games this season. ... Arizona SS Willie Bloomquist was scratched from the original lineup as a precaution because of soreness in his hamstrings. McDonald took his place in the field and Aaron Hill moved up to leadoff. ... Giants 3B Pablo Sandoval (broken left hamate bone) felt good after 30 swings of BP left-handed and fielding grounders. He does not know when he'll be able to start hitting right-handed again. ... San Francisco's Tim Lincecum (2-5) pitches against Ian Kennedy (3-5) for the fourth time the past two seasons in the series finale Wednesday, with the Diamondbacks winning the last two meetings.