NEW YORK -- Alex Rodriguezs record-breaking grand slam was a big one for the Yankees, who can only hope it came in time for a last-gasp run at the playoffs. Rodriguez set a major league mark with his 24th career slam, passing Lou Gehrig with a tiebreaking shot in the seventh inning that sent New York to a 5-1 victory over the San Francisco Giants on Friday night. "It means Im getting old," said Rodriguez, 38. "Its hard to think about things like that right now. Were really on a sprint to the end here and every win is huge for us." A-Rods drive helped CC Sabathia (14-13) beat Tim Lincecum in a matchup of former Cy Young Award winners having subpar seasons. More importantly for the Yankees, it carried them to their second win in seven games as they cling to faint playoff hopes. New York, which has eight games remaining, pulled within three of the second AL wild card -- with three other teams in between. The Indians 2-1 rain-shortened win over Houston, moved them a half-game ahead of Texas, which began the day tied with Tampa Bay atop the standings but lost 2-1 to Kansas City. The Rays beat Baltimore in 18 innings to keep the lead. "Its an unbelievable accomplishment and its a big one for us," Yankees manager Joe Girardi said. "I dont know if we can afford to lose any more games." Alfonso Soriano also homered and New York opened its final homestand with a much-needed victory, hours after pitcher Andy Pettitte announced his plans to retire -- again -- following this season. The news about Pettitte hardly came as a surprise, but the 41-year-old lefty put to rest any speculation he might be back next season. Pettitte, who stepped off the mound for a year before returning in 2012, is scheduled to start the series finale Sunday -- the same day the Yankees will honour retiring closer Mariano Rivera in a pregame ceremony. Rookie outfielder Juan Perez, back home in the Bronx, hit an RBI double for the Giants. The defending World Series champions have spent all week in New York -- they took two of three from the Mets at Citi Field, where a large throng of vocal San Francisco fans made them feel right at home. Giants rooters came out in the Bronx, too, easy to spot in their orange or black jerseys. An audible chant of "Lets go Giants!" quickly drew boos from Yankees fans in the crowd of 41,734. "Theres a lot of Giants fans here. I noticed that. They travel well," Rodriguez said. With the score tied at 1, Eduardo Nunez grounded a single through the right side to start the seventh. Lincecum (10-14) hit Brendan Ryan with a pitch and walked Ichiro Suzuki with two outs, loading the bases and ending the right-handers night. Rodriguez, hampered by a sore leg lately, reached out and lofted a 2-1 pitch from George Kontos toward the hitter-friendly dimensions in right field for his 654th career homer and seventh this season. "Just tough to watch and tough to put somebody in that kind of situation," Lincecum said. "Just wasted a lot of pitches that inning, didnt attack the zone as much as the previous six, and I felt like I couldve gotten out of that better than what happened." The hit snapped a 1-for-25 slide for A-Rod, who returned Aug. 5 from hip surgery. It was his 14th slam for the Yankees, moving him ahead of Joe DiMaggio for second place on the franchise list behind Gehrig. "Im a huge fan of Lou Gehrig, everything hes done, going back to his college days in New York," Rodriguez said. "Hes kind of the gold standard for a Yankee. Special moment. Ill think about it someday." Sabathia was pulled after a leadoff single in the eighth and walked off to a warm ovation. David Robertson got Perez to ground into a double play, and Rivera worked a perfect ninth. But it was Rodriguez who delivered the big blow. "Unbelievable -- especially at that moment. He came up big for us again," Sabathia said. "Hopefully we can just keep getting big hits like that and keep winning games." Lincecum, who had won four straight decisions, was looking for his first five-game winning streak since early in the 2010 season. He was charged with four runs and five hits in 6 2-3 innings. He threw 66 of 121 pitches for strikes. "He pitched great," manager Bruce Bochy said. "Its some tough luck there in that last inning." NOTES: Giants CF Angel Pagan was rested in favour of Perez. ... DH Buster Posey singled in the sixth to end a 1-for-23 skid on the road trip. ... Rodriguezs previous slam came in Atlanta on June 12 last year. ... Looking to spark his struggling lineup, Girardi moved a slumping Suzuki into the leadoff spot, partly because he had faced Lincecum several times in the past few years. ... LHP Boone Logan (elbow) was available, Girardi said. ... After the Yankees got in late following Thursday nights loss at Toronto, C Chris Stewart was rested in favour of rookie J.R. Murphy. "Physically, I just think its too hard," Girardi said. New Orleans Pelicans Jerseys . Its the second straight year he has decided not to play as he cuts back his schedule. Stricker was replaced in the field by Ryo Ishikawa of Japan. Lonzo Ball Pelicans Jersey . "No difference at all," chirped U.S. roommate and linemate James van Riemsdyk. "Its still the same cranky Phil. https://www.pelicanslockerroom.com/Jordan-Crawford-City-Edition-Jersey/ . Assistant coach Glen Gulutzan said Thursday that Edler, who played Tuesday in Nashville, is out indefinitely. Zylan Cheatham Jersey . - Canadian tennis star Eugenie Bouchard has signed with WME-IMG, saying the sports management powerhouse will help maximize the value of my brand. Jahlil Okafor Pelicans Jersey .J. - Pete Carroll is in support of the NFL looking further into whether medicinal marijuana could beneficial for players.Justin Wadsworth may be the head coach of the Canadian cross-country team, but that doesnt mean he wont help a rival skier in need. When Russias Anton Gafarov crashed and broke a ski during a semifinal heat in the mens cross-country sprint, Wadsworth was right there to help. Gafarov was clearly out of the race, but still wanted to finish in front of the home crowd. But his ski was too badly damaged in the crash and he took another tumble into the snow. Thats when Wadsworth went to help. The Canadian coach ran onto the slope, spare ski in hand, and quickly fastened it to Gafarovs boot, drawing a cheer from the crowd. Though the Russian was three minutes behhind his competitors, he still finished the race thanks to the Canadian coachs help.dddddddddddd It brought back memories of the 2006 Olympics in Torino, when Norwegian coach Bjornar Haakensmoen helped out Canadian cross-country skier Sara Renner in the team sprint event. Renner broke her ski pole halfway through the race, and Haakensmoen provided her with a new one. Ironically, the move prevented Norway from winning a medal in the event, as Renner and Beckie Scott won silver, while the Norwegians finished in fourth. As a token of their appreciation, fans across Canada donated five tonnes of maple syrup to Haakensmoen as a thank you gift. ' ' '