The Boston Red Sox avoided the major embarrassment of having to take Mookie Betts, the American League MVP, to arbitration. The club settled with the 26-year-old outfielder on a $20 million contract for the 2019 season, according to a major-league source.

Betts is under Red Sox control for two more seasons, this year and next. He sits atop the list of pending free agents the Red Sox will try to extend and lock up for a long-term contract before he enters free agency after the 2020 season.

Past negotiations with Betts have not gone well. He and the club could not come to an agreement on salaries the last two seasons. Before the 2017 season, Betts’ contract was renewed. A year ago Betts and the club went to arbitration, with Betts coming out on top with a $10.5 million salary in 2018.

Had the Red Sox and Betts been unable to come to an agreement before Friday’s 1 p.m. deadline, the sides would have gone to arbitration again because the Red Sox don’t negotiate after filing arbitration figures. The prospect of the Red Sox arguing for a lower salary for the MVP winner would have been a particularly unflattering look for the team this year and also serve as a red flag for their chances to come to an agreement on a contract extension for Betts.

The Boston Globe reported that the Red Sox agreed to deals with all of their arbitration-eligible players Friday.

Shortstop Xander Bogaerts, who batted .288 with 23 home runs and 103 RBI for the World Series champs, agreed to a $12 million, one-year deal according to the Globe.

The Globe also reported that Boston reached deals with outfielder Jackie Bradley Jr. ($8.55 million), pitcher Eduardo Rodriguez ($4.3. million), infielder Brock Holt ($3.575 million), catcher Sandy Leon ($2.475 million), relief pitcher Matt Barnes ($1.6 million), relief pitcher Brandon Workman ($1.15 million), and outfielder/catcher Blake Swihart ($910,000).