The Yankees -- who snapped a five-game losing skid with the victory -- held a 6-0 lead heading into the ninth thanks to a masterful performance from ace CC Sabathia. He allowed the first two runners to reach base in the frame, and was lifted in favor of David Robertson, who couldn't close the door either, setting the stage for Rivera.
"You've got the greatest closer of all time on the mound, so you feel pretty good about it in that situation," Yankees manager Joe Girardi said. "It's not what you want to get into -- 6-5, bases loaded, Albert Pujols up. But we did and we got him out."
Rivera, however, downplayed the significance of the dramatic final frame in his final game -- barring a postseason meeting between the two clubs -- at Angel Stadium.
"It's part of the game," Rivera said afterward. "We didn't plan it like that. It just happened like that. I'm glad that we just won."
Angels right fielder Mark Trumbo broke up the shutout with an RBI single that ricocheted off Robertson's right leg, just above his knee. After Howie Kendrick struck out and J.B. Shuck walked, Girardi called upon Rivera, who allowed two hits and a walk before fanning Pujols on a check-swing.
"We really executed well in the ninth inning," Angels manager Mike Scioscia said. "I think some guys off the bench did a good job with some situational hitting. Unfortunately, we couldn't get that tying run across."
Sabathia was every bit the stopper the Yankees needed their ace to be. Coming into the game with an ERA above 4.00, Sabathia pitched as though he had something to prove, allowing just five hits and striking out six.
Staked to a five-run lead in the third inning, the veteran southpaw didn't allow an extra-base hit until the ninth and was rarely threatened.
"I told myself just to keep pitching, stay aggressive and keep attacking," Sabathia said. "...We've been struggling, and for them to put up five, I didn't want it to go to waste."
The third inning offered an all-too-familiar scene for the reeling Yankees offense. As had been the case so often during their five-game skid this past week, the Bombers' bats appeared set to squander yet another opportunity. Second and third with no one out in the top of the third had quickly become two outs and two strikes on an ice-cold Travis Hafner.
Mired in an 0-for-23 slump, the veteran slugger changed his own fortunes and those of the club with one swing. He crushed a hanging slider over the center-field wall and into the Angel Stadium rock formation for a three-run homer. The Yankees broke out for two more in the frame on RBI hits from Lyle Overbay and Jayson Nix.
"It was big for us," Hafner said. "Guys definitely loosened up after that. It was good to have some fun there, offensively, in the third inning."
When Hafner's homer landed, it marked the first time the Yanks had put a number higher than two in the runs column since Tuesday.
"We got over the two mark," Girardi said with a smile. "We seemed to get stuck, so I thought, 'Well, we're going to get more now.' It's almost like a meter that was stuck. That's a huge two-out hit."
All in all, it wasn't an ideal road trip, as the Yanks finished their West Coast swing having gone 4-6 and just 1-5 against the Angels and A's.
Still, they'll head back to the Bronx trailing Boston by just three games -- two in the loss column -- and riding a bit of momentum after battering one of the American League's top pitchers, Jered Weaver.
"That's good," Girardi said. "Obviously, we're going to play the teams in our division a lot, and we have a chance to make up ground that way. We just need to play good baseball."
Both clubs could have easily broken through in the first inning, as each put two men on base with nobody out. The Yankees even loaded the bases with one down. But Weaver induced a double-play ball off the bat of Vernon Wells, and in the bottom half of the frame, Sabathia did the same to Pujols.
The big left-hander cruised after that, retiring 11 straight, before the first two batters reached base in the fifth. He worked out of that threat, too, getting Erick Aybar to bounce into a double play and Alberto Callaspo to tap back to the mound.
The Angels wouldn't threaten again until the bottom of the ninth, when they made things very interesting for Rivera, who was greeted by a nice ovation from the 41,204 in attendance. He was then greeted by three singles and a walk, before fanning Pujols to seal his 632nd career save.
"We won, and that's the most important thing," said Rivera, who still hasn't lost a game in Anaheim since that May 23, 1995, debut. "CC pitched a tremendous game. The guys responded today."