Massachusetts Financial Services Co. agreed to class action status in a case by employees challenging the management of the affiliated mutual funds in their 401(k) plans.

The class covers more than 2,000 people who have invested in the plans since 2011, the parties told a federal judge Jan. 25.

The lawsuit accuses MFS of mismanaging the plans, which together hold more than $500 million, by offering high-cost funds affiliated with the company and by failing to investigate lower-fee options.

More than 99 percent of the plans’ assets were held in MFS-affiliated funds as of 2015, and those investments earned money...