NEW YORK -- There was a time, a couple of years ago, when the Miami Marlins would have seriously considered trading Giancarlo Stanton to the Boston Red Sox, according to a source with direct knowledge of talks between the teams.

This was before Stanton signed his massive contract extension with the club, and there was still an assumption around baseball that as with so many of their other stars, the Marlins eventually would not be able to afford the slugging outfielder.

But the talks never gained traction, the source said, because the Marlins insisted that shortstop Xander Bogaerts be part of the return. There was no point in talking further, the Marlins said, unless the Sox included Bogaerts. They had similar conversations with the Baltimore Orioles. You want Stanton, you need to give us Manny Machado.

Any time the Red Sox checked in subsequently, the Marlins’ message was the same. And as much as the Red Sox coveted Stanton, Bogaerts was a price they were not going to pay.

It was serendipitous, the source said Thursday, that the Red Sox held firm on Bogaerts, or “Bogie-licious” as David Ortiz called him Wednesday night. The shortstop turned 23 on Thursday, and is putting the finishing touches on a season of historic dimensions.

Bogaerts entered play Thursday with 194 hits, tied with Jose Altuve of the Astros for most hits in the American League. With his first-inning single Wednesday off Yankees starter Masahiro Tanaka, Bogaerts passed Hall of Famer Ted Williams for most hits by a Red Sox player 22 years of age or younger.

In the last 40 years, here is a list of the players who have had at least as many hits as Bogaerts at 22 years or younger: Starlin Castro, Miguel Cabrera, Albert Pujols, Alex Rodriguez, Cal Ripken Jr., Garry Templeton and George Brett. Ripken and Brett are in the Hall of Fame. Rodriguez, Pujols, and Cabrera are considered (along with Manny Ramirez) the best right-handed hitters of this generation.

Bogaerts has four games left to reach 200 hits, a level last reached by a Sox player in 2011, when Adrian Gonzalez had 213 hits. In the last 68 seasons, eight Sox players have had 200 hits or more: Gonzalez, Jacoby Ellsbury, Dustin Pedroia, Mo Vaughn (twice), Nomar Garciaparra, Wade Boggs (7), Jim Rice, and Bill Buckner.