BOSTON — A Massachusetts judge has allowed supermarket chain Market Basket to distribute $300 million to shareholders over the objections of the company’s embattled chief executive.

The ruling is a setback for Arthur T. Demoulas, who’s been locked in a long-running legal battle with family members over control of the Tewksbury, Mass.-based chain. All nine shareholders are members of the Demoulas family.

The Boston Globe reports that a judge this week denied a motion by Arthur T. Demoulas that sought to halt the distribution that had been authorized by Market Basket’s board of directors. A majority of the board was selected by allies of Demoulas’s cousin and rival, Arthur S. Demoulas.

Arthur T. argued the distribution would harm the company.

Market Basket has more than 70 stores in Massachusetts, New Hampshire and Maine.