– The Associated Press

SAN FRANCISCO – Juan Uribe homered, Jonathan Sanchez won his second straight decision, and the San Francisco Giants rallied from an early three-run deficit before holding on through closer Brian Wilson’s struggles to beat the Boston Red Sox 5-4 on Friday night.

Sanchez (6-5) appeared in for a long night after he allowed Kevin Youkilis’ three-run homer in the first inning, but he contributed an RBI infield single as San Francisco got three runs back in the second. Buster Posey had an RBI single that inning among his three hits.

The Red Sox lost Dustin Pedroia in the third inning after he fouled a ball off his left foot. The second baseman was examined by a trainer, but finished the plate appearance to draw a walk from Sanchez. Pedroia was then replaced by pinch-runner Mike Cameron.

THE RED SOX optioned outfielder Josh Reddick to Triple-A Pawtucket and recalled left-hander Fabio Castro to provide some relief to a taxed bullpen.

Castro, in his second big-league stint of 2010 but without an appearance, gives the Red Sox some length in the bullpen for the weekend interleague series against the Giants. He was 3-5 with a 6.65 ERA in 431/3 innings and 17 outings for Pawtucket. He last pitched in a major league game on Sept. 17, 2007, for the Phillies at St. Louis.

THURSDAY NIGHT’S GAME

RED SOX 13, ROCKIES 11: Dustin Pedroia went 5 for 5 with three home runs, including a tie-breaking shot off Huston Street in the 10th inning, to lift Boston over Colorado at Denver in a wild game that lasted nearly five hours.

Boston averted a series sweep in a rematch of the 2007 World Series and bailed out closer Jonathan Papelbon after he squandered a late lead at Coors Field for the second straight night.

“That was a crazy game,” said Pedroia, who matched a career high with five RBI. “It was mentally draining. I’m just happy we won.”

Marco Scutaro singled with one out in the 10th and Pedroia sent a shot into the left-field bleachers off Street (0-1), who recently was activated after spending 2½ months on the disabled list with right shoulder inflammation and a strained left groin.

“I knew he got it good. It sounded good,” Street said.

But Pedroia wasn’t so sure he got enough of Street’s hanging slider, though.

“In the thin air, I was hoping it would get in the first or second row,” said Pedroia, the 2008 AL MVP. “I didn’t see where it went. I just saw the left fielder put his head down. I’m like, ‘That’s awesome.’ “