SAN FRANCISCO -- After seven games as a San Francisco Giant, center fielder Juan Perez already leads the team in outfield assists.
Now he's joined the list of players with game-winning hits as well.
Perez burned the red-hot San Diego Padres both in the field and at the plate Tuesday night, preventing a potential tiebreaking run with a seventh-inning throw, then breaking the deadlock one inning later with a two-out, two-strike single that propelled the Giants to a 5-4 victory.
The defeat ended the Padres' seven-game hitting streak.
"It was a little revenge for yesterday," Perez said of quickly reversing the sting of Monday's 5-3, 13-inning loss to San Diego. "Anytime you get the game-winning hit, it's amazing to me."
Avoiding falling to .500 for the first time since the first week of the season, San Francisco (36-34) moved past San Diego (36-35) and into a tie for second place with the Colorado Rockies in the tight National League West standings. The Arizona Diamondbacks hold a 1 1/2-game lead atop the division.
Coming to bat after the Padres took a 4-3 lead in the top of the eighth on a two-run, pinch homer by Jesus Guzman, the Giants wasted no time reversing their fortunes.
Buster Posey got things started by smacking a single up the middle off San Diego reliever Dale Thayer (0-3). After Hunter Pence struck out, Brandon Belt tied the game with a booming double off the brick wall in right-center field, scoring pinch runner Andres Torres.
"We needed something there," Giants manager Bruce Bochy said of Belt's game-tying hit.
Soon, more was to come.
Batting with two outs, two on and two strikes, Perez sliced a hard grounder past Padres second baseman Logan Forsythe and into right field. Belt scored easily, enabling the Giants to snap a three-game losing streak overall and a four-gamer to the Padres.
"He's been a real shot in the arm for us," Bochy said of Perez, a minor league call-up who has stepped into injured Angel Pagan's spot in center field. "He's a talented player. He can run, hit, throw. It's something we've really needed."
Jean Machi (2-0), who bailed the Giants out of a two-out jam in the eighth, got the win after inducing a groundout from the only batter he faced, Chris Denorfia. Sergio Romo pitched a scoreless ninth for his 17th save, shutting the door on a Padres team that had won its previous four games in come-from-behind fashion.
"To come back like that, it's been a while since we've done that," Belt said.
Perez's big throw came in the top of the seventh, one inning after home runs by Nick Hundley, his fifth, and Forsythe, his second, ruined a Matt Cain shutout effort and pulled the Padres into a 2-2 tie.
Mark Kotsay led off the San Diego seventh with a double. It appeared he would score easily on Denorfia's single up the middle, but Perez's second perfect throw in two nights gunned down Kotsay at the plate.
"I didn't think he had a chance," Bochy said of Perez's second outfield assist. "He saved the game for us. He won the game for us."
Not all news was good for the Giants on the winning night. Already without Pagan and third baseman Pablo Sandoval, the Giants had to remove shortstop Brandon Crawford in the fourth inning after he sprained the middle and index fingers on his right hand while sliding head-first into second base on a steal attempt.
Bochy said Crawford would not play in Wednesday's series finale, but he wouldn't rule him out for Thursday, when the Miami Marlins come to town.
The Padres, who entered the game with the best June record in the NL at 11-5, appeared headed to an eighth consecutive win when Guzman blasted his homer to center field off Jeremy Affeldt in the top of the eighth following a one-out walk to Forsythe. That gave San Diego a 4-3 lead.
The two-run Giants eighth denied the Padres of an 18th come-from-behind victory this season and gave them just their third loss in 12 consecutive games against teams with winning records.
"I think it shows our guys can play with good teams," Padres manager Bud Black said of the recent stretch. "Our guys have proven that even though we're a club that doesn't get a lot of acclaim nationally, our guys can play and we're playing well. It was a good game again tonight; we just fell a little short."
Neither starting pitcher factored in the decision despite dueling in a 2-2 game into the bottom of the seventh inning.
Cain left with a 3-2 lead after striking out 10 in seven innings. He gave up San Diego's first two runs on six hits. He didn't walk a batter.
Padres starter Andrew Cashner gave up 10 hits in 6 2/3 innings. He struck out six, walked one and surrendered the first three Giants runs.
NOTES: The home runs allowed by Cain were the 14th and 15th of the season off the right-hander. ... Giants 2B Marco Scutaro, playing for the first time since suffering what was labeled a "mallet" finger when hit by a pitch on his left pinkie June 11, made an immediate impression in his return. His sliding stop on Kyle Blanks' first-inning grounder saved a run, and he had two infield hits in four at-bats. ... When Black recorded his 500th managerial victory in Monday's extra-inning triumph over the Giants, he became just the third 100-win pitcher to reach the milestone. The others: Hall of Famers Clark Griffith and Walter Johnson. Black won 121 games as a pitcher in his major league career. ... Before the game, the Giants announced the signing of their first-round pick in this month's draft, 18-year-old SS Christian Arroyo of Hernando High in Brooksville, Fla. The 25th overall selection is a candidate for Florida's Mr. Baseball award.