Mariano Rivera stunned a raucous crowd still buzzing after Robinson Cano's grand slam. Mr. Automatic faltered for the third straight game, the rarest of slumps for the dominant closer.

Russell Branyan's three-run homer on the first pitch Rivera threw in the ninth inning was not enough to wipe out the lead, though, and the New York Yankees beat the Los Angeles Angels 6-5 Thursday, giving Rivera his 30th save for the 14th season.

"As much as we want to think that he's about as close to the perfect closer as we have seen, he's not perfect," Yankees manager Joe Girardi said.

After earning 29 saves this season with relative ease in his 15th year of shutting down teams with a buzz-saw cut fastball, Rivera gave up a run in a third straight appearance for the first time since last September against Baltimore, Tampa Bay and Boston.

The blip began on Sunday in Boston, when he blew his fourth save opportunity this season. On Tuesday, he gave up a two-run drive to Bobby Abreu in a tie game, his first homer allowed at Yankee Stadium this season.

"The saves and the stuff is OK but it won't make me or break me," Rivera said. "Games like this get me upset because I'm not doing what I'm supposed to be doing."

There's nothing wrong, Rivera said. He's just missing with one pitch.

"It's not that I've been missing and missing and missing and missing," he said. "Just one pitch, you get on one of those streaks. It happens."

Branyan was aware of Rivera's recent struggles and was prepared when he came to bat.

"For a three-game stretch, I've never seen him get hit this way," Branyan said. "I was just aggressive because he always come after me. ... I've gotten that same pitch before and pulled it foul."

Rivera retired the next two batters to preserve the victory.

Cano had given the Yankees a 6-2 lead with his fifth career grand slam off Scott Downs two pitches after Maicer Izturis made a two-out error to load the bases.

It was 2-all in the seventh when Mark Teixeira hit a routine bouncer toward Izturis, but the ball hit off the second baseman's glove when he looked for the throw before securing the ball. Two pitches later, Cano lined a shot off the facing of the second deck in right field for his 20th homer of the year.

"He had to have taken his eye it to read the play, because Izzy has the best hands on that field," Angels manager Mike Scioscia said. "That was certainly out of the blue. You wouldn't expect that."

Cano took a nice easy trot around the bases after taxing himself earlier — in the second, he took off for second base five times on full-count pitches that Nick Swisher fouled off. He ran for a sixth straight time when Swisher grounded out.

Relegated to cheerleader since losing his designated hitter job last weekend, Jorge Posada urged Cano out of the dugout for a curtain call.

"It's a great feeling," Cano said.

Alberto Callaspo had given the Angels a 2-0 lead with a two-run homer off Bartolo Colon in the fifth before the Yankees rallied to win the three-game series after dropping the opener.

Curtis Granderson followed his two double-play balls with a tying, two-run homer in the sixth for the Yankees.

Fernando Rodney (2-4) gave up two walks in the seventh for the Angels, who lost just their second series in the last 16 (13-2-1).

Derek Jeter had three singles — two infield hits — and a walk to raise his average in day games to .352 (38 for 108).

Rafael Soriano (2-1) allowed his first baserunner — Bobby Wilson's one-out single — since returning from the disabled list July 29 in the seventh. He extended his scoreless stretch to six innings by getting two flyouts after the hit.

Cory Wade gave up two one-out hits in the ninth before giving way for Rivera.

New York had runners on base in each of the first four innings, with Brett Gardner advancing to third base with one out in the third. But Tyler Chatwood got inning-ending double plays from Granderson in the first and third, each coming after Jeter singled.

Granderson came through after Jeter's infield hit in the sixth, though. He lofted Chatwood's pitch on a high arc and right fielder Torii Hunter ranged back and waited to see if the ball would clear the wall. It did, and Granderson had his fourth homer in the series.

"An out all the way," Granderson said he thought of the flyball.

Erick Aybar snapped an 0-for-30 skid with a slow roller that made it about halfway up the third-base line for a single. Callaspo then turned on a 2-2 pitch, pulling it into the second deck down the right field line for a 2-0 lead.

Colon gave up two runs and five hits against his former team. He walked two and struck out three.

Chatwood was as calm and efficient as his 38-year-old opponent, the 2005 Cy Young Award winner. He yielded eight hits and two runs in 5 1-3 innings.

NOTES: It was only the fourth time in Rivera's career that he has yielded extra-base hits in three games in a row. ... Gardner was caught stealing in the eighth to snap his streak of 22 straight steals. ... Yankees 3B Alex Rodriguez (knee surgery) is set to play in his first rehab game Friday, with Class-A Tampa. He will be the designated hitter. On Saturday, he will play in the field. Girardi said he expects A-Rod back late next week... Scioscia would not identify a starter for Monday against Texas. He did say the starter will come from the big league club, not a callup. ... The Angels travel next to Toronto. Ervin Santana (8-8) faces Brandon Morrow (8-6) on Friday night. Santana is 5-0 with a 1.57 ERA in his past eight starts. ... The Yankees play host to the Tampa Bay Rays. A matchup of aces: CC Sabathia (16-6) vs. David Price.