ST. PETERSBURG, Fla. (AP) Alex Rodriguez had a tying, two-out RBI double in the ninth and Slade Heathcott followed with a three-run homer, leading the New York Yankees to a 4-1 victory over the Tampa Bay Rays on Monday night.

The victory moved the Yankees within three-games of AL East-leading Toronto.

Erasmo Ramirez held the Yankees hitless until Carlos Beltran led off the eighth with a hot shot that took a short-hop off first baseman Richie Shaffer and went into right field.

More from FoxSports

Tampa Bay stopped a 21-inning scoring drought and took a 1-0 lead on Logan Forsythe's eighth-inning RBI double.

The Yankees rallied in the ninth. Down to their last out, Brett Gardner was walked by Brad Boxberger (4-10) on four pitches and stole second. Then Rodriguez tied Craig Biggio for 21st place all-time with his 3,060th hit.

Heathcott homered after Brian McCann was intentionally walked, setting off a raucous celebration in the New York dugout.