Robinson Cano, the most sought-after free agent in a thin class, has agreed to a 10-year, $240-million contract with the Seattle Mariners, sources confirmed Friday, snubbing the New York Yankees after months of negotiations and posturing.

The total value of the contract matches Albert Pujols' with the Los Angeles Angels for the third largest in baseball history, behind only two Alex Rodriguez contracts.

[Also: Leonys Martin lawsuit details allegations of Cuban baseball player smuggling ]

While they'd hoped to re-sign their valuable second baseman, the Yankees were unwilling to invest more than about $175 million over seven years. Already this winter they'd signed outfielder Jacoby Ellsbury for $153 million, catcher Brian McCann for $85 million and on Friday were nearing a one-year deal with right-hander Hiroki Kuroda for $16 million. They are likely to use money earmarked for Cano to sign at least one more player – outfielders Shin-Soo Choo, Carlos Beltran and Nelson Cruz are possibilities – and they still need pitching.

Cano's commitment to Seattle and the Mariners, and theirs to him, comes as a major upset in baseball's winter, and at a time the Mariners are seeking to re-establish a foothold in their city and the American League West. The Mariners are counting on Cano to be their best position player since Ken Griffey Jr. and to lead their return to relevance after failing to reach the postseason for a dozen years. With Cano in the fold, the Mariners are expected to attempt to lure other players, including a possible play for Tampa Bay Rays ace David Price.

Represented by rap artist and nascent sports agent Jay Z, Cano leaves the organization that signed him at 18 out of the Dominican Republic and helped develop him into one of baseball's most productive and consistent players.

Cano, 31, will be 41 when the contract expires. The Yankees make a habit of such contracts, which often end when their players are long past their primes while still carrying traces of their earlier star power. They did in this case restrain themselves; Cano's side initially sought more than $300 million over 10 years. In a market that did not initially appear to develop much past the Yankees, team officials repeatedly said they would not commit those kinds of dollars or years to Cano. The Mariners stepped into that opening, and so will benefit for at least the next few years from the Cano capable of 25 home runs and deft right-side defense. Cano, a left-handed hitter, could find Seattle's Safeco Field a bit more of a challenge than the friendly right-field porch at Yankee Stadium, however. In 40 games at Safeco, Cano batted .309, but with only four home runs in 152 at-bats. Many of those games would have been played before the team drew in the fences.

It also leaves the Yankees in the position of replacing their best player.

The Yankees began the winter with an aging, 85-win team that failed to reach the postseason for the second time since 1994, a manager who was a free agent and an ownership directive to trim payroll for luxury tax purposes -- all while the hated Boston Red Sox won their third World Series title in a decade set to the soundtrack of the Alex Rodriguez appeal.

They signed manager Joe Girardi to a four-year extension and signed McCann and Ellsbury, but needed to rebuild parts of a pitching staff that was mediocre and lost icons Andy Pettitte and Mariano Rivera to retirement. Kuroda, their most reliable starter, was a free agent. On the bright side, so was Phil Hughes, who signed with the Minnesota Twins. They'd also intended to sign Cano, but not, apparently, at all cost.

Story continues