After it looked like a near certainty that the New York Mets would lose Yoenis Cespedes to free agency in 2016, the team has re-signed the outfielder to a very favorable deal. New York’s most imposing hitter from last season has agreed to a three-year contract worth $75 million.

The deal will pay Cespedes $27.5 million next year, and allow him to opt out of the contract after the 2016 season. The Cuban slugger took less money to play in New York, reportedly turning down a five-year, $100 million contract offer from the Washington Nationals. Compared to the contracts signed by the other marquee free-agent hitters, New York appears to have landed themselves a bargain.

Jason Heyward signed the biggest contract of any position player, getting paid $184 million over eight years by the Chicago Cubs. Justin Upton didn’t garner nearly as much money in free agency, but he was still given $132.75 million over six years by the Detroit Tigers. At 30 years old, Cespedes is four years older than Heyward and two years older than Upton, but the Mets outfielder put up much better numbers in 2015 and has a chance to do the same over the next few seasons.

Cespedes is coming off the best year of his career, hitting 35 home runs in 159 games with the Mets and Tigers, while playing Gold Glove defense. Heyward’s defense was superb and he hit .293, but his power was lacking with just 13 home runs. Upton has hit at least 26 home runs in three straight seasons, but his batting average was 40 points lower than Cespedes’ .291 mark last season.

Cespedes' salary next year will be higher than that of both Heyward and Upton, but New York has put themselves in a position to afford such a deal. The Mets haven’t been active in free agency, making Asdrubal Cabrera’s two-year, $18.5 million deal the most lucrative contract they gave out this offseason. The team let Daniel Murphy sign with Washington, and the Cespedes contract will put their payroll near $140 million, which wouldn’t even rank in the top eight among payrolls last season.

There is certainly some risk involved in signing Cespedes. The 2015 season was a career-year for the power hitter, and he likely won’t play as well as he did with the Mets over the final two months of the regular season. He posted just a .584 OPS in the playoffs, coming up short when the team needed him most. But the three-year deal is short enough that Cespedes should still be motivated to play well and earn a new contract, making the Mets one of the favorites entering the 2016 season.

After losing the 2015 Fall Classic to the Kansas City Royals, the Mets remain one of MLB’s best teams. They have the best starting rotation in baseball, and putting Cespedes in the middle of their lineup gives them a formidable offense.

The Mets’ core is set for the next few years. The offense is led by Cespedes and David Wright. Matt Harvey, Jacob deGrom, Noah Syndergaard, Steve Matz, and Zack Wheeler lead a rotation with a combination of youth and talent that MLB probably has never seen before.

Cespedes reportedly was looking to sign a six-year deal worth $150 million. By not budging, New York can compete for the next few years while giving themselves payroll flexibility for when their young starters need to be paid new contracts.