SAN FRANCISCO (AP) -- Will Smith's resume as a pitcher has grown substantially this season, with 28 saves and an All-Star appearance.
It turns out the Giants' closer is pretty good with a bat, too.
Kevin Pillar hit a tiebreaking triple that scored Evan Longoria with two out in the bottom of the eighth inning, Smith followed with a two-run single in his first career at-bat and San Francisco rallied to beat the Philadelphia Phillies 9-6 on Sunday night.
''Smitty's been wanting to hit,'' Giants manager Bruce Bochy said. ''I know he's been talking about it. He was excited about getting a chance to hit up there. That's huge, you get those insurance runs. That game was entertaining.''
Longoria singled leading off the eighth against Jose Alvarez (3-3) and went to second on a wild pitch with two outs. Pillar, who had an RBI single in the third, followed with a drive into the gap in right-center off Nick Pivetta.
After Brandon Crawford was intentionally walked and stole second, Smith blooped a 3-1 pitch into right field to score Pillar and Crawford as the crowd at Oracle Park roared.
''I actually took some swings today in the cage before catch, just messing around,'' Smith said. ''I hit three balls over the tee just playing around. I guess it paid off. I felt like a Little Leaguer out there when I was running the bases.''
Hitting coach Alonzo Powell wasn't totally surprised.
''He knew what he was doing the whole time,'' Powell said.
Smith admittedly was a little overwhelmed by the moment and nearly got thrown out by Harper while running slowly to first base. Harper's throw was just off line, allowing Smith to reach safely.
''If that throws on line I'm definitely out for sure,'' Smith said. ''But I would have made Bochy challenge it probably.''
Smith (4-0) retired five batters and earned the win. The right-hander also made a spectacular defensive play when Roman Quinn dropped a bunt to lead off the ninth. Smith pounced on the bunt and threw out Quinn on a close play at first.
Cesar Hernandez had three hits and two RBIs for Philadelphia. Bryce Harper drove in a pair of runs.
''The Giants were able to execute and we weren't,'' Phillies manager Gabe Kapler said. ''This ended up being a very rough road trip.''
Both managers had to go deep into their bullpens after each starter was knocked out early. Philadelphia's Jake Arrieta lasted three innings, while San Francisco's Conner Menez left after retiring five batters.
The Phillies led 5-2, but left the bases loaded twice and stranded six runners in scoring position.
ARIETTA'S QUICK EXIT
Arrieta's night ended after three innings and 66 pitches, another setback for the 33-year-old former Cy Young Award winner who has been pitching with a bone spur in his right elbow. Arrieta allowed seven hits and five earned runs, the sixth time this season that he has allowed five or more earned runs.
WALKING A THIN LINE
Giants pitchers combined for 11 walks. It's the first time San Francisco has won a nine-inning game despite walking 11 or more since Sept. 20, 2006. It's also the 11th time that the Giants have won when issuing 11 walks or more in the San Francisco era.
VELASQUEZ IN A PINCH
Vince Velasquez, who started for Philadelphia and took the loss Saturday, singled as a pinch-hitter in the fifth. It's Velasquez's second pinch-hit single this season and the third of his career.
GIANTS TO RETIRE 22
The Giants announced during a pregame ceremony honoring the 1989 NL Championship team that Will Clark's No. 22 will be retired next year. Clark, now a special assistant with the team, was joined on the field for the announcement by several other former Giants from the team that lost to the Oakland A's in the '89 World Series. ''To be forever linked with the greatest who have ever played this sport here in San Francisco, it's absolutely amazing,'' Clark told the crowd.
Giants: Pablo Sandoval has inflammation in his right elbow, a result of ''loose bodies'' according to manager Bruce Bochy. That's why Sandoval was limited to pinch-hitting against the Phillies. ... RHP Johnny Cueto will throw about 45 pitches or three innings Thursday in a rehab start with Class A San Jose. Cueto is recovering from Tommy John surgery last year. ... Alex Dickerson (right oblique strain) hit in a cage before the game and will do baseball activities on the field during Monday's off day. If all goes well, Dickerson will DH for Triple-A Sacramento on Tuesday.
Phillies: After a day off, LHP Jason Vargas (6-5, 3.93 ERA) faces the Chicago Cubs for the second time this season Tuesday in Philadelphia. Vargas is 3-0 in seven career starts against the Cubs.
Giants: LHP Madison Bumgarner (7-7, 3.74) pitches the opener of a two-game series against the Oakland Athletics on Tuesday. Bumgarner is unbeaten in his last nine starts.
More AP MLB:�https://apnews.com/tag/MLB and�https://twitter.com/AP-Sports