Morgan Stanley has agreed to pay about $382,000 to settle accusations by Massachusetts regulators that it failed to stop one of its brokers from excessively trading investor accounts.

Under the consent order, Morgan Stanley has been censured, fined and ordered to provide full restitution to four Massachusetts investors who lost money due to Morgan Stanley’s failure to supervise one of their broker dealer agents, Massachusetts Secretary of the Commonwealth William F. Galvin announced in a press release today.

Morgan Stanley overlooked the excessive trading of Boston-based registered representative Justin E. Amaral, who repeatedly engaged in excessive trading of a number of Massachusetts investors’ accounts, in order to drive up his commissions, according to the press release. The practice is also called churning.

Morgan Stanley is required to pay $182,500 in restitution to the investors and a $200,000 administrative fine, the press release said.

Amaral, who worked as a rep for Morgan Stanley from 2009 to 2014, when he resigned, was barred by Finra in June 2015.

Though Morgan Stanley’s written supervisory procedures required supervisors to monitor reps’ accounts for indications of churning, Massachusetts securities division said that most alerts on Amaral’s accounts were closed out without further investigation after he told supervisors that the excessive trades were the result of poor performance in the market or account rebalancing.

The “closure of those activity review alerts show that Morgan Stanley’s supervisors failed in their duty to monitor its agent’s trading activity,” the press release said.

Morgan Stanley did not open an investigation into Amaral’s excessive trading alerts until a customer’s accountant filed a complaint in April 2014, according to the consent order.

The customer’s accountant made the complaint after he discovered that Amaral was designated as the executor of the customer’s estate and as a beneficiary in the customer’ will, according to regulators. Amaral had not disclosed the relationship to Morgan Stanley.

Morgan Stanley’s own investigation uncovered numerous issues relating to Amaral’s trading activities, regulators said. At least five clients filed complaints against Amaral for excessive trading, which Morgan Stanley resolved on a case-by-case basis paying more than $1.8 million in settlements, they said.