SAN FRANCISCO (AP) -- Madison Bumgarner became the first pitcher in 48 years to hit two grand slams in a season, and Buster Posey also hit a slam Sunday that boosted the San Francisco Giants over the Arizona Diamondbacks 8-4.
Posey and Bumgarner became the first batterymates in major league history to hit grand slams in the same game.
A double by Bumgarner helped set up Posey's slam in the fifth. Bumgarner homered the next inning - he also hit a slam on April 11 against Colorado.
The last pitcher to launch two slams in a season was Tony Cloninger, who hit both in the same game for Atlanta on July 3, 1966, against the Giants at Candlestick Park.
Bumgarner (10-7) threw 6 1-3 innings to end a personal three-game losing streak. He gave up four runs and 10 hits, striking out five.
Vidal Nuno (0-1) allowed four runs and six hits in five innings during his second start with Arizona.
The Giants finished the first half by winning five of nine. That followed a stretch of 18 losses in 23 games that cost them their lead in the NL West.
Cody Ross hit a two-run homer for the Diamondbacks, who are 5-8 in their past 13 games. Martin Prado had three hits and drove in a run.
Nuno, acquired from the New York Yankees in a trade for Brandon McCarthy, had not allowed a run in his first 11 innings with the Diamondbacks before Posey's slam.
Bumgarner escaped a perilous sixth because of some fancy defensive plays, including his own.
Ender Inciarte and Prado each singled to start the inning. With Paul Goldschmidt batting, Bumgarner caught Inciarte taking off early for third for the first out.
Right fielder Hunter Pence tracked down Goldschmidt's drive one step before slamming into the fence and third baseman Pablo Sandoval made a diving stop of Mark Trumbo's sharp grounder to end the inning.
Nuno breezed through the first four innings before running into trouble in the fifth. Bumgarner's one-out double started the rally. Pence was hit by a pitch and Sandoval, who had three hits, singled ahead of Posey, who homered into the left-field bleachers.
A double, an infield fielding error and a walk set up Bumgarner's slam in the sixth against Matt Stites. Bumgarner earlier victimized Jorge De La Rosa of the Rockies.
NOTES: Goldschmidt went 0 for 4 and had his career best streak of safely reaching base end at 32 games. ... Giants 1B Brandon Belt was a late scratch due to back tightness. ... INF Marco Scutaro was a little sore according to Giants manager Bruce Bochy and was given the day off. ... Posey has three career grand slams, including the postseason. ... Arizona manager Kirk Gibson said he was going to spend part of the All-Star Break watching his son play in the Cape Cod League. ... Ross' homer gave him 501 RBIs for his career.