Wells Fargo will pay a $35 million fine for improperly recommending risky investments to some of its clients, including senior citizens and retirees, the Securities and Exchange Commission said Thursday.

These clients were encouraged to buy a risky version of an exchange-traded fund, known as an ETF, according to the SEC’s cease-and-desist order. These “single-inverse ETFs” use complex financial engineering to deliver big profits when stocks fall.

But these types of ETFs can lead to devastating losses when held for more than a day and are traditionally recommended only for sophisticated investors.

Wells Fargo recommended that some clients hold them for “months or years” even though they had “moderate or conservative risk tolerances,” according to the SEC settlement. “Some of these clients had little or no relevant investing experience.”

Wells Fargo said in a statement that it will no longer sell “single-inverse ETFs” in its “full-service brokerage” but that customers could still buy them from other providers.

The $35 million penalty will be distributed to Wells Fargo investors who were harmed, the SEC said.

Wells Fargo was sanctioned by the industry’s self-regulator, the Financial Industry Regulatory Authority, in 2009 for sales practices around these ETFs, but the conduct continued until 2019, according to the SEC. “Wells Fargo’s policies and procedures relating to single-inverse ETFs . . . were not reasonably designed to prevent and detect unsuitable recommendations of these complex products,” the SEC said.

This comes as Wells Fargo struggles to repair its image after admitting to consumer abuses. Last week, it reached a $3 billion settlement with the Justice Department and the SEC to settle charges that its aggressive sales goals led to widespread consumer abuses, including millions of accounts opened without customers’ consent.