SAN FRANCISCO -- Before Saturday afternoon's game, manager Bruce Bochy said he's had a hard time keeping his bench fresh, since Joe Panik has been too effective to take out of the lineup. Panik belongs and is comfortable in the Majors, Bochy said.
By dinnertime, Panik had made his manager look pretty smart.
Panik went 2-for-3 with a walk and an RBI and scored the game's winning run after hitting his first career triple to lead off the eighth, as the Giants came back to beat the Phillies, 6-5, at AT&T Park.
With the win and the Pirates' loss to the Nationals, the Giants took sole possession of the second National League Wild Card spot, leading the Bucs by a half-game.
The rookie second baseman has hit .410 (16-for-39) in his last 11 games and raised his batting average 43 points to .274 in that span.
"I've hit my stride here," said Panik, who credited his recent success to having adjusted to Major League parks, pitching and off-the-field life. "I'm comfortable with where I'm at."
Where he's at -- second base -- has been a troublesome position throughout the season for the Giants. Brandon Hicks couldn't hit. Marco Scutaro can't stay healthy. Dan Uggla … happened. Finally, it appears the Giants -- who have lacked bottom-of-the-order production for months -- have found a reliable option to spark the bottom of the lineup while playing solid defense at second.
"[Panik is] showing that he belongs up here," Bochy said after the game. "He has a knack of slowing down the game. That goes with confidence, but this kid has the ability to get the good part of the bat on the ball.
"He's earned going out there every day, the way he's played."
"Bochy knows the game inside and out, and he's one of the best managers in the game, so his vote of confidence makes me feel good," said Panik.
That's how Saturday afternoon must've felt for Jeremy Affeldt and Gregor Blanco, who each atoned for Friday night hiccups.
After his two baserunning mistakes on Friday, it was Blanco who hit the eighth-inning single that drove Panik home for the winning run. A half-inning prior, Affeldt made up for the game-tying home run he allowed Friday night by inducing an inning-ending double play.
Their redemptive performances helped pick up starter Tim Hudson.
The Phillies first got to Hudson in the third. A Ryan Howard single scored Jimmy Rollins, and Marlon Byrd tacked on a sacrifice fly. The Phils then batted around and scored three in the fifth -- thanks to a Chase Utley RBI double and a two-run single from Howard -- knocking Hudson out of the game before he recorded an out.
Hudson surrendered five earned runs on eight hits and three walks in four-plus innings, which raised his ERA above 3.00 for the first time this season.
Given the Giants' summer struggles, AT&T Park felt pretty grim when Hudson was yanked from the game. The offense was again sputtering, and the prospect of back-to-back losses to the Phillies didn't exactly evoke a sense of confidence. Then…
"The bats came alive," Bochy said. "We started placing the ball well, kept the line moving, and when that happens, it really picks up the energy."
Down 5-1, the Giants tied the game when they batted around in the sixth. After Buster Posey singled and Pablo Sandoval reached on an error, Michael Morse hit an RBI double. One batter later, with the bases loaded and nobody out, Panik chopped one over the mound and beat the throw from pitcher Mario Hollands to first. A Blanco bloop to left dropped to score Morse, and a sacrifice fly from Angel Pagan tied the game at 5.
Saturday was Morse's second consecutive encouraging performance, as he went 3-for-3 with two doubles, a triple and a walk. This followed a three-run home run, a walk and a 410-foot out on Friday.
"I didn't really hold up my end of the bargain today, but everybody else did," Hudson said. "Sometimes that's enough to win."
Saturday's victory was just San Francisco's ninth in their last 32 along the shores of McCovey Cove.
"Hopefully," Bochy said, "we're getting back to who we are: a team who gets contributions from everybody throughout the lineup."
Ryan Hood is an associate reporter for MLB.com. Follow him on Twitter @ryanhood19. This story was not subject to the approval of Major League Baseball or its clubs.