NEW YORK -- On the brink of another major milestone during a surprisingly successful comeback season, Alex Rodriguez stood on first base and soaked in the adulation of an adoring crowd.

A-Rod certainly didn't expect it to be this good.

Rodriguez reached 2,999 hits with a pair of singles, and Carlos Beltran and Brett Gardner each had two-run homers, leading the New York Yankees to a 9-4 victory over the Miami Marlins on Thursday night.

"I don't even know how to describe it. It feels great," Rodriguez said. "Every time moments like that happen, I can just reflect on a year ago today."

Sixty-six games into his return from a yearlong drug suspension, Rodriguez hit an RBI single in the first inning for the second straight night, flied out to right field in the third and hit a sharp grounder past diving third baseman Donovan Solano in the fifth to move within one hit of becoming the 29th player to reach the 3,000 plateau.

He lined out in the sixth, his first try at joining the elite club -- swinging at specially marked balls.

Yankee Stadium speakers blared with a piece of Beethoven's famed Symphony No. 5 as Rodriguez came to bat in the eighth with nearly all of the 38,239 cheering fans rising to their feet, camera phones flashing.

"The fans just want to see the players do well, that's the bottom line, and he has done well," manager Joe Girardi said in explaining the support for Rodriguez. "Sometimes people pull for people to fight back and get back up, when they've been knocked down."

Miami reliever Sam Dyson didn't give A-Rod a chance to swing, throwing four inside pitches that sent the slugger leaping back each time.

"I threw him four fastballs inside. That was the sequence," Dyson said. "If he was gonna beat me he was gonna have to get the head out. I ended up throwing four balls kind of at his belt, not the plate."

The boos got louder with each pitch and turned to vulgar chants aimed at Dyson that lasted until he was lifted three batters later, following Chris Young's RBI double.

"It is what it is," Dyson said of the jeers. "I tried beating him with my best stuff."

The Yankees made every effort to get Rodriguez one more shot at the milestone, sending six men to the plate after his walk. Brian McCann had an RBI single and Stephen Drew added a sacrifice fly in the inning.

Gardner's longball chased Mat Latos in the sixth to tie it at 3, and Beltran, who was booed when he popped out to end the sixth, put New York ahead with a drive to left an inning later off reliever Mike Dunn (1-4) and rounded the bases to loud applause.

CC Sabathia gave up three runs in six effective innings, allowing Giancarlo Stanton's major league-leading 25th homer, as the Yankees won for their ninth time in their last 10 home games.

"It's hard for me. It's difficult not being the guy I used to be, going deep in the games," Sabathia said. " I just go out there as hard as I can until I'm done."

Chasen Shreve (4-1) gave up a hit in one inning for the win.

With A-Rod in the lineup as the designated hitter, the Yankees won the final two games of a four-game, home-and-home series that began in Miami. The three-time MVP was limited to one pinch-hit at-bat in two losses at the NL ballpark.

A night after being no-hit into the seventh by Michael Pineda, Gordon tripled for Miami's first hit off Sabathia leading off the seventh. He scored on Christian Yelich's groundout to tie it 1-all.

The Marlins then went ahead in the fifth on Jeff Mathis' sacrifice fly. Stanton's homer to left field in the sixth made it 3-1.

Stanton has 13 homers in his last 23 games.

"It just shows you how special he truly is," Marlins manager Dan Jennings said. "On any given swing he can leave the ballpark. We're watching him become more of a complete hitter."

In his second start since coming off the disabled, Latos gave up nine hits and three runs in 5 2/3 innings.

TRAINER'S ROOM

Marlins: INF Martin Prado (right shoulder) was put on the DL, retroactive to June 15. Jennings said Prado worked out in Florida, but is still too sore.

Yankees: CF Jacoby Ellsbury (knee) ran from first to third several times during batting practice. It was first thought that Ellsbury would go to the Yankees' complex in Florida for rehab after the series in Miami, but he returned to New York with the team. Girardi said it was not a setback.

A HALL OF A BAT

Baseball's Hall of Fame said A-Rod has donated the bat he used to get his 2,000th RBI, on Saturday in Baltimore. The bat will be displayed in the Today's Game exhibit.

UP NEXT

Marlins: RHP Dan Haren (6-3) faces the Reds. He has struggled at Great American Ballpark in Cincinnati, with a 5.59 ERA in six games, five starts.

Yankees: RHP Adam Warren (4-4) starts against the Detroit Tigers. Warren has a 2.81 ERA in his four losses.