SAN FRANCISCO -- Ty Kelly doesn't play much, but he's learned to make the most of his opportunities.
"He's my secret weapon," Phillies manager Pete Mackanin said.
Mackanin summoned him at the most opportune of times on Saturday night, and Kelly delivered.
Kelly had a pinch-hit grand slam, Rhys Hoskins hit a three-run homer and Philadelphia snapped a six-game losing streak, beating the San Francisco Giants 12-9.
"I take anything positive, but that was pretty amazing," Kelly said.
Down 12-4, the Giants scored five times in the ninth inning and brought the tying run to the plate before Hector Neris struck out Carlos Moncrief for his 14th save.
Adam Morgan (1-1) threw just one pitch and got the win.
Kelly batted for Morgan and hit a slam off Cory Gearrin that capped a seven-run burst in the sixth inning for an 11-4 lead. He has 14 RBIs on 14 hits this year.
"The one thing he does is he doesn't overswing," Mackanin said. "He doesn't try to do too much and he's got some quickness in his bat. If you make a mistake like they did tonight, he doesn't try to overpower, he just tries to put the head on it and that's what he did tonight."
Denard Span became the first Giants player to lead off with an inside-the-park home run in 72 years. The last Giant to do it was Johnny Rucker on June 20, 1945, when the team played in New York and was at the Polo Grounds against the Boston Braves, according to the Elias Sports Bureau.
Ty Blach (8-9) took the loss.
Rupp doubled off Blach with one out to start the sixth, with Span losing the high flyball to center field. The ball landed in front of him.
"He lost it. He never saw it in the twilight," Giants manager Bruce Bochy said. "The ball is tough to pick up at that time of the night."
Giants star Buster Posey was 1 for 4, extending his hitting streak against the Phillies to 21 games going back to 2014.
Hoskins homered for the fourth time in seven games. Since going hitless in his first 12 at-bats after being called up from Triple-A, the rookie is 7 for 21 with four home runs in seven games.
His power surge has coincided with his team making a trip to the Bay Area, near where he grew up in the Sacramento area. He had about 35 to 40 friends and relatives at Saturday's game.
"I grew up a Giants fan, to play in this ballpark is pretty special," Hoskins said. "It's something that I dreamt of, especially to get a win the way we did tonight is pretty cool."
Phillies: RHP Zach Eflin's status for his next turn in the rotation is uncertain after the 23-year-old reported tightness in right shoulder, Mackanin said. ... RHP Ben Lively is with the team and will be activated before Sunday's game to start the series finale, Mackanin said. Lively will take the roster spot of outfielder Odubel Herrera, who on Friday was placed on the disabled list with a hamstring injury (retroactive to Aug. 15). Lively will take RHP Mark Leiter's spot in the rotation in a move that sends Leiter to the bullpen.
Giants: RHP Johnny Cueto will pitch in a rehab assignment for Triple-A Sacramento on Monday and likely make one more rehab start before being activated, manager Bruce Bochy said. Cueto has been on the disabled list since July 15 with blisters on his right hand. He will throw 50 to 60 pitches on Monday, Bochy said.
Phillies: Lively (1-4, 3.80 ERA) recorded his lone career win against the Giants on June 3, when he gave up one run in seven innings of four-hit ball. Lively was optioned to Triple-A Lehigh Valley on pitch in the majors for the first time since July 5.
Giants: LHP Madison Bumgarner (3-5, 2.99) is 4-3 with a 3.60 ERA in nine career starts against the Phillies. He was 0-1 with a 5.56 ERA in two starts against the Phillies last season.
The Giants scored early and often Friday night, giving Bruce Bochy no reason to switch anything up Saturday in San Francisco.
Philadelphia Phillies (43-77)
1. Cesar Hernandez (S) 2B
2. Freddy Galvis (S) SS
3. Nick Williams (L) CF
4. Rhys Hoskins (R) LF
5. Maikel Franco (R) 3B
6. Jorge Alfaro (R) 1B
7. Cameron Rupp (R) C
8. Cameron Perkins (R) RF
9. Jerad Eickhoff (R) P
San Francisco Giants (50-74)
1. Denard Span (L) CF
2. Hunter Pence (R) RF
3. Jarrett Parker (L) LF
4. Buster Posey (R) C
5. Pablo Sandoval (S) 3B
6. Brandon Crawford (L) SS
7. Ryder Jones (L) 1B
8. Kelby Tomlinson (R) 2B
9. Ty Blach (R) P