Updated

NEW YORK — Francisco Lindor and the New York Mets have agreed to a $341 million, 10-year deal, keeping the All-Star shortstop in Queens for the long haul after acquiring him from Cleveland in the offseason, according to a person familiar with the agreement.

The person spoke to The Associated Press on Wednesday night on condition of anonymity because the deal hadn't been announced.

Lindor was eligible for free agency after this season and said this spring he wouldn't negotiate with the Mets on a long-term contract after opening day. Less than 24 hours before New York starts its season Thursday night in Washington, an agreement was reached.

BIDEN SAYS HE'D 'STRONGLY SUPPORT' MLB MOVING ALL-STAR GAME OUT OF ATLANTA OVER GEORGIA ELECTION LAW

The 27-year-old Lindor has two Gold Gloves and made four All-Star teams in six seasons with the Indians, hitting .285 with an average of 29 homers, 86 RBIs and 21 stolen bases per 162 games.

He was the prized pickup in new owner Steve Cohen's first offseason, acquired from Cleveland along with right-hander Carlos Carrasco for infielders Amed Rosario, Andrés Giménez and two minor leaguers. New York added Lindor knowing he could walk after the 2021 season, but the team said it would try to negotiate a long-term pact.

New York Mets' Francisco Lindor (12) is congratulated by Michael Conforto after scoring on a solo home run during the fifth inning of a spring training baseball game Miami Marlins, Tuesday, March 23, 2021, in Port St. Lucie, Fla. (AP Photo/Lynne Sladky)

New York Mets' Francisco Lindor (12) is congratulated by Michael Conforto after scoring on a solo home run during the fifth inning of a spring training baseball game Miami Marlins, Tuesday, March 23, 2021, in Port St. Lucie, Fla. (AP Photo/Lynne Sladky)

MLB Network was first to report on the agreement.

Lindor will retain his $22.3 million salary for 2021 before the contract kicks in for 2022.

METS' PETE ALONSO SPEAKS OUT ON FRANCISCO LINDOR'S CONTRACT SITUATION: 'PAY HIM $400 MILLION'

The deal will be the largest ever for a shortstop, passing Fernando Tatis Jr.'s $340 million, 14-year contract with San Diego signed in February. Only Mike Trout's $426.5 million, 12-year deal with the Los Angeles Angels and Mookie Betts' $365 million, 12-year contract with the Los Angeles Dodgers are worth more. Betts' deal includes $115 million in deferred payments through 2044.

Lindor's deal is also by far the largest payout ever from the Mets, surpassing contracts for third baseman David Wright ($138 million), pitchers Jacob deGrom ($137.5 million) and Johan Santana ($137.5 million).

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Cohen tweeted Tuesday that Lindor was a "heckuva player and a great guy" and said he hoped to strike a deal. He confirmed the pair had dinner together over the weekend.