Mike Leake pitched a nine-hitter for his first career complete game and homered off Matt Cain, and the Cincinnati Reds beat the San Francisco Giants 5-1 on Friday night.

Zack Cozart hit the first pitch of the game from Cain over the wall in left-center and, just like that, San Francisco's franchise-record streak of four straight shutouts had ended.

Jay Bruce added a two-run double in the first among his four hits to stake Leake (3-5) to a quick cushion as the Reds got to Cain early to snap a four-game road skid. Leake homered with two outs in the sixth, his second of the year.

Cain (9-3), pitching at home in sold-out AT&T Park for the first time since tossing the 22nd perfect game June 13 against the Astros, had his career-best eight-game winning streak snapped.

The right-hander allowed three runs in the first inning for the first time since June 24, 2010, at Houston.

San Francisco's pitching staff went 36 innings without allowing a run, beginning after Cain's start at Oakland last Sunday and lasting until his next outing. It was the longest scoreless innings streak in San Francisco history and second-longest to the franchise mark of 38 accomplished by the New York Giants in 1903 and '33.

Bruce also hit an RBI double in the seventh that chased Cain, matching his career high with four hits for the fifth time he has done it.

Cain's 11 hits in 6 2-3 innings matched his most given up this year and the right-hander lost for the first time in 11 starts since a defeat to Miami on May 1. He allowed five runs, struck out seven and walked one.

While Cain has the perfecto to his name, it was everybody else in the rotation — Barry Zito, Ryan Vogelsong, Tim Lincecum and Madison Bumgarner, in that order — involved in the remarkable string of shutouts. San Francisco also was the first team in major league history to blank four clubs when the opponent had begun the day in first place.

Leake came out for the ninth and allowed Pablo Sandoval's one-out home run before retiring Brandon Belt on a deep fly to center and striking out Brandon Crawford to end his impressive 111-pitch performance.

Leake escaped the fourth on an inning-ending double play on which Sandoval, trying to break it up, reached his right hand around shortstop Cozart's left leg to trip him up and keep him from turning it. Belt was initially called safe, then Reds manager Dusty Baker raced out to argue. The umpiring crew visited and overturned the call to interference, ending the inning.

Brandon Phillips returned to the Reds lineup after he was scratched before Thursday night's series opener because of continuing effects from the blow to the head he received during Wednesday's 8-4 loss to the Milwaukee Brewers. Baker said Phillips passed all concussion tests Friday.

Phillips went 1 for 5 with a seventh-inning single and stolen base before scoring on Bruce's second double.

"He was trying hard to lobby to get back in the lineup," Baker said.

Leake singled in the second ahead of his homer. Joey Votto also contributed two hits for the Reds, who finish the first half with this 11-game road trip.

NOTES: Leake threw 76 pitches for strikes. His 37 hits over the last three seasons are most by any major league pitcher. ... Cain is 4-2 with a 2.01 ERA in eight home starts. ... A low-hovering blimp cause plenty of uneasiness for those watching it swirl in the wind just above the ballpark and near the center field light poles early in the game. At first pitch, the wind was 12mph blowing toward center. ... Baker managed the Giants' 2002 World Series runner-up team that will be honored here Sunday. "It's hard to believe it's been 10 years," Baker said. "My son was 3 at the time. Now he's 13." Some players have already begun to arrive, including Benito Santiago and Pedro Feliz. Home run king Barry Bonds is scheduled to attend the festivities. ... Baker is 15-13 as a visiting manager at AT&T Park. ... The Giants called up RHP Brad Penny, signed to a minor league contract May 18 for his second stint with the organization, from Triple-A Fresno.