Updated

Andy Pettitte was great in his last scheduled start at Yankee Stadium, but the San Francisco Giants spoiled his day and the Yankees' celebration of Mariano Rivera by dealing New York a crushing blow to its playoff hopes with a 2-1 victory.

The Yankees held a lavish pregame ceremony for the retiring Rivera and New York held a 1-0 lead behind five brilliant innings from Pettitte. It appeared to be setting up for another save from the Hall of Fame closer, but the Giants picked up a run in the sixth and another in the eighth.

Ehire Adrianza connected for his first major league homer off Pettitte in the sixth and a Tony Abreu RBI double in the eighth against David Robertson gave the Giants the lead and helped them salvage the finale of the three-game set.

Pettitte (10-11) left the field to a thunderous ovation after surrendering a leadoff double to Pablo Sandoval to start the eighth inning with the game tied at 1-1. He tipped his cap to the fans and was greeted by longtime teammate and injured captain Derek Jeter before reaching the dugout. The fans then continued chanting his name and he acknowledged the crowd with a curtain call.

Robertson, though, was unable to pick him up, as a grounder to first by Hector Sanchez advanced pinch-runner Nick Noonan to third and he scored easily on a double into right field by Abreu.

Rivera entered the contest and got five outs, but the Yankees could not scratch out a run to tie the contest despite having a great chance in the eighth inning.