Third baseman Rafael Devers and the Boston Red Sox are finalizing an 11-year, $331 million contract extension, sources told ESPN, a deal that will keep the 26-year-old star from reaching free agency this year and constitutes the longest and largest guarantee ever given by the franchise.

The agreement, which is expected to be signed Wednesday night and would be the largest ever for a third baseman.