SAN FRANCISCO — Juan Perez is trying to convince the San Francisco Giants to keep him around when injured center fielder Angel Pagan returns from the disabled list.
A couple more performances like this one, and it's going to be hard to return him to the minors.
Perez threw out a runner at the plate and then hit a tiebreaking single with two outs in the eighth, helping the Giants end the San Diego Padres' seven-game winning streak with a 5-4 victory on Tuesday night.
"He's been quite the sparkplug that we seemed to have needed," said Sergio Romo, who pitched the ninth for his 17th save. "He's showing us who he is and what he can do, and that's what you like to see out of young guys like that."
Perez was initially called up as a temporary fix while Pagan recovered from a hamstring strain, but the rookie is batting .421 (8 for 19) in seven games since joining the Giants on June 7. Defensively, he already has four assists.
With Pagan possibly beginning a rehabilitation assignment this week, San Francisco manager Bruce Bochy could have a dilemma on his hands.
"We'll cross that bridge when we get to it but you have to like the things that (Perez) is doing," Bochy said. "He's doing all he can to stay here, I'll say that. As soon as Angel's ready to go, we'll probably have a tough decision to make."
Buster Posey started the San Francisco comeback with a leadoff single. After Hunter Pence struck out, Brandon Belt doubled in pinch runner Andres Torres. Nick Noonan was intentionally walked and Joaquin Arias lined out to center before Perez rolled a single just past second baseman Logan Forsythe for the go-ahead score.
"I was just trying to put the ball in play and make something happen," Perez said. "I just have to keep enjoying myself and try to help the team win. After that they'll make the decision."
Belt finished with three hits for the Giants, who moved into a second-place tie with Colorado in the NL West. Jean Machi (2-0) retired one batter for the win.
Perez's clutch swing came after pinch hitter Jesus Guzman gave San Diego a 4-3 lead with a two-run homer in the top half of the inning.
"Every game we lose is tough; this is more so because we just moved into third place," Guzman said. "This was a game we had to win, but in this ballpark it's hard to beat those guys."
Nick Hundley and Logan Forsythe homered for San Diego. The Padres entered with an NL-leading 17 come-from-behind wins and were in position to add to that total before the Giants rallied.
Perez also made a key play in the seventh when he threw out Mark Kotsay at home plate after Kotsay had doubled leading off the inning.
"He's come up and really been a shot in the arm for us," Bochy said of Perez. "He's something we need right now."
Marco Scutaro had two hits in his return to San Francisco's lineup. Gregor Blanco and Posey also had two hits apiece.
The wild finish was in stark contrast to the first part of the game, when San Francisco ace Matt Cain and Andrew Cashner were locked in a pitchers' duel.
Cain had a season-high 10 strikeouts in seven innings and was charged with two runs and six hits. He retired 15 straight at one point.
Cashner scattered 10 hits over 6 2-3 innings and allowed three runs. He struck out six and walked one.
"I threw the ball well, though there were a couple of pitches I'd like back," Cashner said. "The big thing for me was to keep the ball on the ground because the wind was blowing out."
San Francisco beat Cashner in his first start of the season and jumped on him early in this one.
Blanco drew a leadoff walk, stole second and took third on Scutaro's comebacker. Posey then blooped a single into short right to drive in Blanco.
Belt and Noonan opened the fourth with back-to-back singles. Belt then scored on a double-play grounder to make it 2-0.
Cain was unable to hold onto the lead.
Coming off an impressive outing against Pittsburgh in his previous start, the right-hander retired 15 straight after allowing a single to Forsythe in the first. He was cruising until the sixth.
Hundley ended Cain's run with his fifth homer of the season, a towering shot to left that made it 2-1. One out later, Forsythe belted a drive to left-center.
San Francisco's defense provided a spark after Kotsay's hit in the seventh. Chris Denorfia followed with a single to center but Perez threw out a sliding Kotsay at home.
Blanco hit an RBI single off Cashner in the seventh but the Padres grabbed the lead on Guzman's second pinch-hit homer of the season.
NOTES: San Francisco SS Brandon Crawford left with two sprained fingers on his right hand after getting thrown out attempting to steal second in the second. ... Giants All-Star 3B Pablo Sandoval (left foot strain) is expected to begin a rehab assignment with Class-A San Jose on Friday. The reigning World Series MVP took batting practice and fielded grounders before the game. ... The Padres signed OF Ben Francisco to a minor league contract and assigned him to Triple-A Tucson. ... San Diego OF Carlos Quentin (left shoulder) sat out his fourth straight game but is improving, manager Bud Black said. ... Padres SS Everth Cabrera's left hamstring showed no signs of improvement so the Padres plan to place him on the disabled list. ... LHP Eric Stults (6-5) pitches the series finale for San Diego and has a 2.26 ERA over his last nine starts. LHP Madison Bumgarner (6-4) will go after his team-leading seventh win for the Giants. ... San Francisco signed first-round draft pick Christian Arroyo. Arroyo, the 25th overall selection in the draft, batted .524 for Hernando High School in Brooksville, Florida