ST. PETERSBURG, Fla. -- Carlos Pena thrust his arms in the air, rounded first base and headed right into a wild celebration in the middle of the Tropicana Field infield.

Pena defied long odds against CC Sabathia and did it again against Mariano Rivera, lifting the Tampa Bay Rays to a thrilling 7-6 season-opening victory over the New York Yankees on Friday.

Pena hit an early grand slam off Sabathia, then completed a ninth-inning comeback with an RBI single off Rivera.

Pena finished 3 for 5 with five RBIs in his return to the Rays after a year with the Chicago Cubs. All that after a spring in which he hit .107 and struggled so much that manager Joe Maddon initially penciled him into the No. 7 spot in the batting order for the opener.

Maddon had a change of heart Friday, shifting the slugger into the sixth spot.

"Your heart starts racing in that moment and you try to control yourself as much as possible," Pena said. "I tried to slow myself down and breathe and take it one pitch at a time, as easy as you can possibly make it. Instead of building the situation up, you try to bring it down."

Rivera (0-1) had been 60 of 61 in save chances against the Rays. But after Desmond Jennings opened the ninth with a single against baseball's career saves leader, Ben Zobrist tripled home the tying run.

The 42-year-old Yankees closer intentionally walked the next two batters to load the bases and struck out Sean Rodriguez. Pena, who was 0 for 11 lifetime against Rivera, won it by driving a 1-2 pitch off the base of the wall in left-center field for his fifth RBI of the game.

Pena hit his slam in the first. Evan Longoria hit a solo homer in the Rays third, and it stayed 6-5 until the ninth.

"He's the greatest closer in the history of the game and we all know that," Pena said of Rivera. "He has that illusion in his ball. You swing where the ball is at and it's not there anymore. He has perplexed hitters throughout his career. He's the best closer in baseball, and that's for a reason."

Rivera's rough outing was the latest in a recent series of bad outings by big league closers. Jose Valverde, Chris Perez and Boston's Alfredo Aceves all struggled a day earlier.

"My fault. I felt good. I don't make excuses," Rivera, whose other blown save against the Rays came in 2005. "I just left the ball up," he said.

Rivera, beginning his 18th major league season, had converted 27 consecutive opportunities against the Rays.

"When you see him blow one, it's shocking. It's going to happen. It happened. It's baseball," Yankees manager Joe Girardi said. "He got a couple pitches up. He got one up to Jennings, and he got one up to Zobrist. That kind of led to the inning."

Sabathia yielded both of Tampa Bay's homers, but later worked out of a couple of tight spots to cling to the lead the defending AL East champions took on newcomer Raul Ibanez's three-run homer in the third.

Reliever David Robertson escaped a jam in the eighth inning, striking out Stephen Vogt, Jose Molina and Matt Joyce with runners at the corners, seemingly setting up Rivera to close it out.

Fernando Rodney (1-0) struck out one in a perfect ninth to earn the win in his debut for Tampa Bay.

The Rays, who've made the playoffs three of the past four years, raised a 2011 AL wild-card banner to the left-field catwalk before the game and Pena brought the sellout crowd of 34,078 to its feet again in the bottom of the first when he sent a 3-2 pitch into the right-field stands for his eighth career grand slam.

Tampa Bay's career home run leader entered the day 4 for 35 with two homers and 19 strikeouts lifetime against Sabathia, who walked Rodriguez intentionally -- just the fourth intentional pass of the young shortstop's career -- to get to Pena.

"It was the right move. If I make the pitches, then we have nothing to talk about," Sabathia said.

The Yankees battled back with two runs in the second and four more in the fourth, when Ibanez's put them ahead 6-4. The offseason free agent acquisition was 0 for 12 against Rays starter James Shields, including a grounder to second base that drove in New York's first run, before getting his first hit for his new team.

With the 30-year-old Shields making the fourth opening day start of his career, the Rays used a starting pitcher 30 or older for the first time since May 24, 2007, at home against Seattle.

Shields made a start in Chicago the following game, beginning what evolved into a major league record stretch of 764 consecutive games started by pitchers under 30.

Shields allowed six runs and nine hits, walked three and struck out three in five innings. The right-hander, who set Rays records for complete games (11) and shutouts (4) while becoming a first-time All-Star in 2011, also hit a batter and unleashed a wild pitch that allowed a run to score in the second.

Sabathia, a 19-game winner a year ago, wasn't sharp, either. The 31-year-old lefty struck out Pena twice to help himself through jams in the third and fifth innings but wound up throwing 104 pitches in six innings. The Yankees ace allowed five runs and eight hits, walked three and struck out seven.

Alex Rodriguez went 2 for 3 with a pair of walks and scored two runs for the Yankees. He's hit safely in all eight opening day games he's played for the Yankees.

Game notes

Some the Yankees sported T-shirts in the clubhouse before the game with the slogans "Yankees 1" accompanied by a degree sign on the front and "Mind Heart Guts" on the back. ... With Rays closer Kyle Farnsworth beginning the season on the 15-day disabled list with a right elbow strain, Tampa Bay manager Joe Maddon plans to fill his role by committee. RHPs Joel Peralta and Rodney are among the candidates to get much of the work. ... Yankees LHP Andy Pettitte is scheduled to face Philadelphia Phillies minor leaguers in extended spring training on Monday, his second game action since ending a one-year retirement. Meanwhile, RHP Michael Pineda, who's on the disabled list because of right shoulder tendinitis, played catch Friday for the second straight day. ... Looking to give his starters a regular break from playing in the field this season, Girardi is expected to have Rodriguez or Derek Jeter DH on Saturday.