Major League Baseball
San Francisco 7, Pittsburgh 6
When: 7:05 PM ET, Wednesday, June 22, 2016
Where: PNC Park, Pittsburgh, Pennsylvania
Temperature: 77°
Umpires: Home - Jim Reynolds, 1B - Manny Gonzalez, 2B - CB Bucknor, 3B - Fieldin Culbreth
Attendance: 33747

PITTSBURGH -- The way the Giants and Pirates are going in opposite directions, a five-run difference didn't feel all that discouraging to San Francisco or all that safe to Pittsburgh.

Joe Panik's two-run, sixth-inning double finished off San Francisco's comeback from a five-run deficit, and the Giants withstood three Pittsburgh homers in the first three innings to beat the Pirates 7-6 Wednesday night.

Ramiro Pena also drove in two runs as the Giants rebounded from a 6-1 deficit in the fourth to win their 10th in 11 games and their second in as many nights. San Francisco (46-27) collected 22 runs and 34 hits in the two wins.

"Nice win, nice comeback," Giants manager Bruce Bochy said.

And for the slumping Pirates, nothing new.

Gregory Polanco hit a three-run homer in the second inning during a three-hit night, but the Pirates (34-38) still dropped their seventh in eight games and 12th in 14 games. They have gone from nine games over .500 on May 27 to four games under .500 while losing 19 of 25.

Pittsburgh's John Jaso led off the first with a homer, Polanco followed with his shot in the second, and Jung Ho Kang made it 6-1 with a solo shot in the third, all off Giants starter Jeff Samardzija. However, Pirates starter Francisco Liriano and his bullpen couldn't hold the lead.

With the Giants down 6-4, Brandon Crawford singled to start the sixth against Jared Hughes (0-1) and immediately scored on Pena's double. Pinch hitter Jarrett Parker singled, and one batter later, Panik's double off the heel of left fielder Polanco's glove put the Giants up 7-6.

"He uses the whole field, is tough to strike out, you like him up there when you need a hit," Bochy said of Panik, who has the game-winning hit in three of the Giants' last five road wins.

Polanco normally plays right field, but was in the more spacious left field in PNC Park as Starling Marte shakes off an apparent leg injury.

"It's completely different (left field from right field) -- it's much different," Polanco said. "But I should have caught that ball."

Pittsburgh native Derek Law (3-1) threw two scoreless innings for the victory as five Giants relievers combined for six shutout innings.

"I made sure to let all these guys know -- it says a lot about your team that as a starter you can go out and have a crummy day (and you still win) ... that doesn't happen too often and it's something I won't forget," Samardzija said.

Santiago Casilla pitched the ninth for his 15th save, with the game ending on a double play as Jaso was thrown out trying to steal second on Polanco's strikeout.

Liriano, who lost six of his previous seven decisions, left after giving up four runs on six hits over five innings.

"(I) try to make pitches when I need to and I'm not giving up," Liriano said. "I just need to keep playing and keep making pitches, keep getting better."

Samardzija lasted only three innings in by far his shortest start of the season, surrendering six runs and six hits.

"(With) runners on, you can't be right there over the plate, the ball's got to be a ball or the corner of the plate," he said. "Usually (with the homers) it's up and in the middle of plate."

Samardzija came in with a 1.26 ERA in 11 prior appearances at PNC Park -- most with the Cubs -- but quickly fell behind 6-1 after giving up a homer in each of the first three innings.

Jaso hit his sixth career homer leading off the first, and Matt Joyce followed with an RBI single later in the two-run inning.

Polanco, who singled and scored in the first, then made it 5-1 in the second with his three-run shot on the first pitch he saw from Samardzija, who was coming off a complete-game, four-hit win over the Tampa Bay Rays on Friday.

Samardzija quickly got into trouble in the second ahead of Polanco's 10th homer by walking No. 8 hitter Chris Stewart and allowing Liriano to single to center for his eighth hit of the season.

In the third, Kang hit the second Pirates homer leading off an inning in the span of three innings, a drive to center field for his 10th of the season.

The Giants, who had gotten a run back in the second on Ramiro Pena's RBI single, started to chip away at Liriano for Brandon Crawford's run-scoring single in the fourth and two more runs in the fifth.

Buster Posey, the one Giants' position player challenging to start in the All-Star Game, hit a run-scoring double down the right field line ahead of Angel Pagan's sacrifice fly. Pagan hit a grand slam during the Giants' 15-4 rout of the Pirates on Tuesday.

NOTES: After losing 15-4 on Tuesday and being forced to use C Erik Kratz as a pitcher, the Pirates held optional batting practice Wednesday and allowed players to report to park later than normal. ... The Pirates recalled LHP Kyle Lobstein from Triple-A Indianapolis and optioned RHP Wilfredo Boscan to the Indians. Boscan was needed to make a spot start Tuesday. ... Pirates SS Jordy Mercer, who is 1-for-13 against Jeff Samardzija during his career, was held out of the starting lineup. ... Giants LHP Madison Bumgarner apparently is lobbying the club to allow him to take part in the All-Star Home Run Derby. He has 13 career homers, including 11 in the last three seasons. ... Giants RF Hunter Pence is working out less than two weeks after undergoing hamstring surgery.
Top Game Performances
Starting Pitchers
San Francisco   Pittsburgh
Jeff Samardzija Player Francisco Liriano
No Decision W/L No Decision
3.0 IP 5.0
2 Strikeouts 6
6 Hits 6
18.00 ERA 7.20
Hitting
San Francisco   Pittsburgh
Brandon Crawford Player Gregory Polanco
2 Hits 3
1 RBI 3
0 HR 1
2 TB 6
.400 Avg .600
Team Stats Summary
 
Team Hits HR TB Avg LOB K RBI BB SB Errors
San Francisco 12 0 15 .316 23 8 7 5 0 1
Pittsburgh 10 3 19 .278 18 11 6 2 2 0