PITTSBURGH (AP) -- Sergio Romo keeps insisting he has no desire to be the closer.
Funny, he certainly looked like one while handcuffing baseball's hottest team.
Romo worked a perfect ninth while regular closer Santiago Casilla nursed a blister on his right (pitching) hand and the San Francisco Giants snapped a three-game losing streak with a 6-5 win over the Pirates on Friday night.
The Giants rebounded from a gut-punch loss to Washington on Thursday in which they squandered a late four-run lead by riding red-hot Melky Cabrera and getting just enough from the bullpen to seal it.
Romo is now a perfect 5 for 5 in save opportunities, but shot down the notion he should be the one getting the ball in the ninth every night.
''We all have roles,'' Romo said. ''I'm pretty fortunate to be in tough situations, so every time I'm in the game I look at it like I have to save the game in that situation. I don't really look at it as a closer or whatever. ... I don't need that title. I just want an opportunity to pitch.''
Cabrera continued his torrid play by smacking hit his eighth homer of the season while Ryan Theriot drove in two runs for the Giants.
Barry Zito (7-6) survived five eventful innings to win for the second time in his last six starts. The left-hander gave up four runs on seven hits, walking three and striking out three while needing 91 pitches to get 15 outs.
''I give Z credit, he stayed out of a real big inning and kept the damage at a minimum and gave us a chance,'' San Francisco manager Bruce Bochy said.
The Giants have slumped since surging to the top of the National League West last week, losing five of six. The offense has sputtered while the pitching hasn't been much help. San Francisco surrendered 24 runs while getting swept in Washington earlier in the week, including a 6-5 loss in which a 5-1 lead vanished.
There would be no collapse Friday.
''After a tough series in Washington, one of our harder losses that we've had all year. ... That's a great way to bounce back,'' Bochy said.
Andrew McCutchen had three hits for the Pirates to raise his batting average to a National League-leading .360. Pedro Alvarez and Casey McGehee added solo homers, but couldn't stop Pittsburgh from having its four-game winning streak snapped.
Erik Bedard (4-10) endured another short outing, failing to get through the fourth inning as the Giants turned a three-run deficit into a 5-3 lead behind Cabrera's two-run homer.
The veteran left-hander has been shaky over the last six weeks, battling control issues and a breaking ball that has sometimes betrayed him. He's been steady at home - coming in with a 2-2 record and a 2.31 ERA - and looked to be in good shape while cruising through the first three innings.
Things unraveled quickly in the fourth.
Justin Christian led off with a walk, came home on a double by Theriot and Cabrera followed with a two-run shot to left. Buster Posey walked on four pitches and Pablo Sandoval scratched out an infield hit before Bedard could record a single out.
The Giants pushed two more runs across the plate on an RBI single by Sanchez and an error by Pittsburgh shortstop Josh Harrison that brought home Sandoval as San Francisco jumped ahead 5-3.
''I threw pitches and they hit it,'' Bedard said. ''I didn't feel anything different, they were hitting the pitches.''
Unlike Thursday's meltdown against the Nationals, this time the Giants closed it out to blunt some of Pittsburgh's momentum. Romo retired the side in order, getting McCutchen to ground out to third to end it and stifle the ''MVP!'' chants the All-Star center fielder gets every time he steps to the plate.
The Pirates have been one of baseball's biggest surprises and appeared ready to post their first five-game winning streak since September 2010 after getting to Zito early. McCutchen - who leads baseball with a whopping .456 average against lefties - knocked in Harrison with a single in the first and brought him home again in the third with a triple to left-center field.
When McCutchen trotted home on Neil Walker's double two batters later, the capacity crowd buzzed at the prospect of the Pirates climbing 11 games over .500 for the first time since the end of the 1992 season.
The Giants needed one big inning to regain control as Cabrera, who will play in his first All-Star game on Tuesday, stayed hot on McCutchen's heels in the NL batting race.
''He's just really relaxed,'' Zito said of Cabrera. ''He's waiting for his pitch and he sees the ball really well right now. It's just been fun to be a part of his whole thing and watching that every day.''
NOTES: The series continues Saturday as Pittsburgh's James McDonald (8-3, 2.45 ERA) faces San Francisco's Ryan Vogelsong (7-3, 2.26). ... Pittsburgh relievers Chris Leroux and Doug Slaten cleared waivers Friday and were optioned to Triple-A Indianapolis.