It would be difficult to argue the New York Yankees needed Giancarlo Stanton, the towering, slugging outfielder whose onerous contract the Miami Marlins were shopping around this winter. The Yankees have spent the last few years getting younger and leaner, and in Aaron Judge, the American League rookie of the year, they had not only a virtual clone of Stanton, in both size and skills, but one who was younger and cheaper.

But Stanton, 28, whose record-setting $325 million deal signed with the Marlins in 2014 contains a full no-trade clause, had the Yankees on a very short list of teams to whom he would approve a trade. With both a motivated seller, in the downsizing Marlins, and a motivated superstar, in Stanton, the Yankees reportedly all but stumbled into a deal Saturday for the newly crowned NL MVP.

The deal, reportedly would send second baseman Starlin Castro and prospects to the Marlins — a concession the Yankees were willing to make in part because Castro’s roughly $11 million salary in 2018 would partly offset Stanton’s $25 million luxury-tax hit — a critical distinction, with the Yankees adamant about getting under the $197 million luxury tax threshold in 2018 — and in part because in Gleyber Torres, one of the top prospects in baseball, they had a built-in replacement for Castro.

With Judge and Stanton — 13 feet of muscle-bound, fastball-crushing power, and the only two players in baseball to reach 50 homers in 2017 — now sharing the same lineup, along with slugging catcher Gary Sanchez, the Yankees arguably would have more right-handed power than any team in recent history.

And in a span of 24 hours, the two biggest prizes of this offseason’s talent marketplace have been claimed, with the Los Angeles Angels winning the rights to coveted Japanese two-way star Shohei Ohtani, and now the Yankees getting Stanton.

Both situations had conspired to depress the markets for top free agents, as teams waited to see where Ohtani and Stanton would wind up, but with both off the board, it could portend a freewheeling week at baseball’s winter meetings, which open Monday in Orlando.

With legendary Yankees shortstop Derek Jeter now a part-owner of the Marlins, the deal to send his best player to his former team is sure to be scrutinized for impropriety. But it appears the Marlins are guilty less of malfeasance than of incompetence.

In the last few days, they had negotiated trades of Stanton to both the St. Louis Cardinals and San Francisco Giants without gaining prior approval from Stanton — who, again, had full control of where he would wind up and who shot down both deals. Stanton, a native of Southern California, was thought to prefer the Los Angeles Dodgers as a destination team, but also made it known he would accept a deal to the Yankees.

The Yankees, meanwhile, were not known to be pursuing either outfielders or right-handed power — and certainly not someone who is still owed $295 million over the next 10 years — but getting Stanton at a bargain price, and with the Marlins expected to kick in some money to offset the contract, was too good to pass up. The Marlins had almost no leverage in trying to unload Stanton’s massive contract.

Stanton is signed through 2027, but his contract contains an opt-out provision that he can exercise after the 2020 season. The Yankees were considered throughout the industry as a top suitor for Washington Nationals outfielder Bryce Harper — who headlines the vaunted free agent class of next winter — but the acquisition of Stanton, whose contract could be the starting point for Harper’s contract, may limit their buying power somewhat.