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.

Cameron Rupp homered and doubled, and Freddy Galvis had three hits for the Phillies.

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.

HOMETOWN HERO

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.”

TRAINER’S ROOM

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.

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.