Alex Rodriguez set a major league record with his 24th career grand slam, passing Lou Gehrig with a tiebreaking shot in the seventh inning that sent the New York Yankees to a 5-1 victory over the San Francisco Giants on Friday night.

The New York Post reported that this was Rodriguez's seventh home run of the season and 654th of his career (Willie Mays is next at 660). A-Rod managed all of one hit over his last 25 at-bats.

“I’m not thinking home run there, that’s the last thing I’m thinking,’’ Rodriguez told the Post.

Rodriguez's slam 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 helped them win for the second time in seven games as they cling to faint playoff hopes. New York began the day 3½ games behind Tampa Bay and Texas for the second AL wild card, with three other teams in between.

The Associated Press contributed to this report