SAN FRANCISCO -- The Pittsburgh Pirates recorded the 9,800th win in franchise history in explosive manner Thursday night, bombing the San Francisco Giants with a seven-run fifth inning en route to a 10-5 victory.
Pittsburgh won the opener of a four-game series, retaining its one-game lead in the National League Central over the St. Louis Cardinals, who won earlier in the evening.
In the fifth inning, Pedro Alvarez greeted reliever Jose Mijares with a two-run, ground-rule double, and Jose Tabata capped the game-turning rally with a three-run double.
Garrett Jones and Jordy Mercer hit solo home runs off Giants starter Matt Cain, who left the game one batter into the fourth inning after getting hit in the right forearm by a line drive off the bat of Gaby Sanchez. X-rays were negative.
The homer by Jones cleared the 25-foot-high brick wall in right field at AT&T Park and landed in the San Francisco Bay. It was the third so-called "Splash Hit" at the ballpark this season, all of which have been hit by Giants opponents.
The Giants, coming off a 12-1 shellacking at the hands of the Boston Red Sox, were able to overcome the home runs and rally into a 3-3 tie with a two-run fourth off Pirates starter Jeff Locke.
However, right-hander Guillermo Moscoso (1-2), who relieved the injured Cain an inning earlier, couldn't get anyone out in the fifth, hitting Tabata before walking Neil Walker and Andrew McCutchen to load the bases.
Alvarez's two-run hit -- his second ground-rule double of the night -- made it 5-3 before sacrifice flies by Russell Martin and Sanchez increased the lead to four.
Tabata's crowning blow came after Locke, a .079 hitter entering the game, grounded a two-out single to left field to load the bases.
Right-hander Jeanmar Gomez (3-0), who relieved Locke to start the bottom of the fifth, got the win after pitching three hitless innings.
Brandon Crawford's two-run, pinch-hit double in the eighth inning off the Pirates' third pitcher, Jared Hughes, completed the game's scoring.
Tabata, batting leadoff in place of injured Starling Marte, had three hits, and McCutchen, Alvarez and Mercer had two apiece for Pittsburgh. The Pirates outhit the Giants 13-8.
Brett Pill, starting in left field for the first time this season, had three of the Giants' hits, including a double.
Neither starting pitcher factored in the decision.
Pirates manager Clint Hurdle pulled Locke after four innings despite the fact Pittsburgh led 10-3 and the left-hander was three outs away from his 10th win. Locke was generally ineffective in his stint, allowing three runs on five hits and four walks. He struck out three.
Cain surrendered the home runs by Jones and Mercer during his 3 1/3 innings. He allowed three runs on seven hits, striking out three. He didn't walk a batter.
Marco Scutaro's two-out, two-run single in the bottom of the third got the Giants even at 3-3, taking Cain off the hook for a possible loss.
The Pirates' seven-run explosion off Moscoso and Mijares blew the game open two innings later.
NOTES: The "Splash Hit" by Jones was just the 28th by a Giants opponent in AT&T Park history and only the second by a Pirate. Adam LaRoche had the other in 2007. ... Pirates RHP Jason Grilli threw a 25-pitch bullpen session before the game, his first work off a mound in exactly a month since suffering a strained tendon in his right forearm. The Pirates hope to have their closer back on the roster in early September. ... Pirates LHP Wandy Rodriguez will see Dr. James Andrews next week after experiencing recurring pain in his left forearm while pitching in a simulated game at AT&T Park. Season-ending surgery is a possibility. ... Giants OF Andres Torres' season might be over after he was placed on the disabled list with a left Achilles strain. The veteran is scheduled to see a foot specialist in North Carolina next week to discuss his options. Torres was replaced on the active roster by OF Francisco Peguero, who was promoted from Triple-A Fresno. ... Giants INF Nick Noonan joined Peguero on the trip north from Fresno, replacing LHP Mike Kickham on the roster. Kickham, who pitched in Wednesday's 12-1 loss to Boston, was demoted to Fresno.