The New York Mets and shortstop Francisco Lindor have consented to a 10-year, $341 million deal, a source told ESPN’s Jeff Passan on Wednesday.

Lindor’s deal will be the third largest based on total worth in major league history, trailing only the deals for the Los Angeles Angels’ Mike Trout ($426.5 million) and the Los Angeles Dodgers’ Mookie Betts ($365 million).

The Mets were broadly expected to signal Lindor to a long-term extension after obtaining the four-time All-Star at a blockbuster trade using the Cleveland Indians that this offseason. The discussions became a major narrative during spring training, with new Mets proprietor Steve Cohen composing on Twitter last week,”What do think Lindor will take? I’m going to crowdsource the answer.”

Cohen wrote on Tuesday:”Lindor is a heckuva player and a great man. I hope he makes the decision to sign.”

Lindor, 27, had said he would”go to free service” if he did not have a deal set up by Opening Day, stating he did not want to negotiate during the season. The Mets open Thursday from the Washington Nationals.

In January, the Mets avoided salary arbitration with Lindor by consenting to some one-year deal worth $22.3 million. It had been the fourth-biggest one-piece contract to get an arbitration-eligible participant, trailing Mookie Betts ($27 million with Boston last year), Nolan Arenado ($26 million with Colorado in 2019) and Josh Donaldson ($23 million with Toronto at 2018).

A two-time Gold Glove winner, Lindor is a profession .285 hitter and has averaged 29 homers, 86 RBIs and 21 steals in his six major league seasons — all with the Indians, who kissed him in 2011.

MLB Network first reported the information about Lindor’s contract.