Morgan Stanley agreed to pay $4 million to settle U.S. regulatory claims that it lacked adequate risk controls, enabling a rogue employee at a client firm to engage in fraudulent trading.

Morgan Stanley failed to uphold credit limits for a customer firm, Rochdale Securities LLC, where a rogue trader in 2012 engaged in massive trading of Apple Inc. stock, the Securities and Exchange Commission said today in an administrative order.

“Broker-dealers become important gatekeepers when they provide customers direct access to our securities markets, and in this case Morgan Stanley did not live up to that responsibility,” Andrew Ceresney, director of the SEC’s enforcement division, said in a statement.

The trader bought a total of about $525 million of Apple stock in a single day, on Oct. 25, 2012, far exceeding Rochdale’s pre-set $200 million aggregate daily trading limit with Morgan Stanley, the SEC said. The trader, David Miller, pleaded guilty to related criminal charges last year.

“Morgan Stanley has updated its written procedures to address the issue identified in the SEC’s order, and is pleased to have this matter behind it,” said Mark Lake, a spokesman for the New York-based bank.