BOSTON — Red Sox designated hitter J.D. Martinez has decided to keep his contract with the Red Sox instead of becoming a free agent again.

Martinez signed a $110 million, five-year deal after teams had started reporting to spring training in 2018.

In his two seasons in Boston, the 32-year-old slugger has averaged just short of 40 homers and 118 RBIs, along with a .317 average and .985 OPS. He was fourth, behind teammate Mookie Betts, in the AL MVP voting in 2018, when the Red Sox won a franchise-record 108 games and the World Series.

Martinez has three years and $62.5 million remaining on the deal: $23.75 million for 2020 and $19,375,000 for both 2021 and 2022. He had to make the opt-out decision Monday. He also has the option to opt out after each of the next two seasons, as long as he does not spend a lengthy period on the injured list.

Boston had the highest payroll in baseball last season — $243 million for purposes of the luxury tax — and missed the playoffs for the first time since 2015.