NEW YORK -- The day started in storybook fashion. A moving tribute to Mariano Rivera was followed by Andy Pettitte taking a no-hitter into the sixth inning of his final regular-season start at Yankee Stadium.
The way it ended might have finished the Yankees' playoff hopes.
After honoring the career saves leader and celebrating Pettitte, New York saw its AL wild-card hopes dim Sunday with a crushing 2-1 loss to the San Francisco Giants.
Pettitte was sure the Yankees would rally.
More from ESPNNewYork.com
Sunday's ceremony in the Bronx not only began to close the chapter on Mariano Rivera, but on an era, writes Johnette Howard. Story
"It always seems to happen. I really thought it was going to happen today," Pettitte said. "So it's hard to believe that we're sitting here, that we lost another game. This was a big loss, there's no doubt about that."
In danger of missing the playoffs for just the second time in 19 years, the Yankees dropped four back of Cleveland for the second AL wild card with six games left. New York hosts wild card-leading Tampa Bay for three games, then closes at Houston.
The Yankees held a 50-minute pregame ceremony and retired the No. 42 of Rivera, who announced during spring training that this will be his final season. Rivera was last player to wear Jackie Robinson's number, which was retired throughout the major leagues in 1997 on the 50th anniversary of the day the Brooklyn Dodgers second baseman broke baseball's color barrier. For a little over a week, Rivera becomes the first active player to be given a place in Monument Park.
"I appreciate this day, what the organization did, the fans that were here supporting me," Rivera said. "That was good, but at the end it wasn't that great because we lost the game."
Pettitte said Friday he also is leaving, and he started off perfect until giving up a walk with two outs in the fifth.
Pettitte initially retired after the 2010 season, sat out one year and then returned.
More On The Yankees
Want to get the scoop on everything in pinstripes? ESPNNewYork.com has you covered. Blog
"I'll miss (them) a lot. They're brothers to me," Derek Jeter said. "We've been through a lot, quite a bit together."
For much of the afternoon, Pettitte appeared on track for a vintage performance. The 41-year-old left-hander, a 255-game winner, was backed by Mark Reynolds' third-inning homer and didn't allow a baserunner until Sandoval's fifth-inning walk.
When Sandoval doubled to left in the eighth for the Giants' second hit, Pettitte slammed his glove into his thigh in frustration when he saw manager Joe Girardi bounce out of the dugout.
He left to a sustained ovation, waving his cap to all parts of the stadium, and came out for another wave after a boisterous chant of "An-dy Pett-itte!" Jeter, the injured captain, was there to embrace him in the dugout.
"It was great. It was amazing," Pettitte said. "You obviously start hugging the guys. You know Jete standing there makes it difficult. ... Then of course my head is right there just going, 'I just lost this game for us if we are unable to get this guy.'"
While Rivera has saved 72 of Pettitte's wins, the most for any tandem in major league history, Girardi called on the 13-time All-Star after Abreu's double.
Sergio Romo pitched a hitless ninth for his 36th save in 41 chances. In a sign of how banged up the Yankees are, they sent 22-year-old rookie J.R. Murphy to the plate, and Romo struck him out to end the game.
"These guys had a chance to see the best," Giants manager Bruce Bochy said. "The kids really handled themselves well. I couldn't be prouder."
Girardi said Hiroki Kuroda (11-12) will start Tuesday's series opener against Tampa Bay. ... The Giants went through fielding practice before the game. Bochy said he's determined to have the Giants play out the season at the highest level possible. "It's about pride," he said. ... San Francisco split six games in New York, taking two of three against the Mets.