The Boston Red Sox agreed to a six-year deal with shortstop Trevor Story Sunday, according to multiple reports.

Story's deal is worth up to $140 million, giving the slugging infielder an option to opt out of his deal after the fourth year, USA Today reported. Boston reportedly could avoid the potential for a Story opt-out if it adds a seventh year to the contract, which would boost the total value of the deal to $160 million.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Trevor Story

Trevor Story of the Colorado Rockies walks to the dugout after striking out against the San Francisco Giants at Coors Field Sept. 24, 2021, in Denver, Colo. (Matthew Stockman/Getty Images)

Story, 29, was one of the final remaining big-name free agents on the market. He is coming off six years with the Colorado Rockies in which he was selected to the All-Star Game in 2018 and 2019 and earned MVP votes during the 2020 season.

Story was linked to multiple teams before reportedly deciding on the Red Sox. The New York Yankees were one of the teams chasing the star infielder, according to the MLB Network. New York missed out on the opportunity to sign shortstop Carlos Correa, who signed a three-year deal with the Minnesota Twins.

Trevor Story

Trevor Story of the Colorado Rockies celebrates hitting a solo home run against the Philadelphia Phillies at Citizens Bank Park Sept. 10, 2021, in Philadelphia.  (Tim Nwachukwu/Getty Images)

CARLOS CORREA AND TWINS AGREE TO $105.3M, 3-YEAR DEAL

Story hit 24 home runs with a .251 batting average and an .801 OPS in 2021 with the Rockies. While primarily a shortstop, MLB Network reported that Story signed with the Red Sox to play second base.

Xander Bogaerts is expected to play shortstop in 2022, but Story could move to the position should Bogaerts decide to test free agency before the start of the 2023 season.

Trevor Story

This Sept. 28, 2019, file photo shows Colorado Rockies shortstop Trevor Story in the 10th inning of a game in Denver. (AP Photo/David Zalubowski)

CLICK HERE TO GET THE FOX NEWS APP

Boston finished 92-70 last season and lost in the American League Championship Series to the Houston Astros.

The Associated Press contributed to this report.