American Apparel cut a deal that with its main investor that will allow the downtown Los Angeles clothing manufacturer to pay off a loan and avoid a default and potential bankruptcy, the company announced Wednesday.

The company also announced that founder Dov Charney will resign from the board.

American Apparel will receive $25 million from New York investment firm Standard General, part of which will go toward paying off a $10 million loan. London private equity firm Lion Capital on Tuesday had demanded repayment on the loan, which was issued at a nosebleed 20 percent interest rate.

As part of the deal, Standard General will add three new members to the board and two other directors will be chosen with the mutual consent of Standard General and American Apparel.

Charney was suspended as chief executive by American Apparel’s board last month over allegations of misconduct. The suspension was announced pending a 30-day investigation designed to culminate in his firing. The new board will also appoint an independent committee to oversee a continuing investigation of the allegations.

“This truly marks the beginning of an important new chapter in the American Apparel story,” said Allan Mayer, a co-chairman of American Apparel. “With the support of Standard General, we are confident the company will finally be able to realize its true potential.”

Standard General and Charney together own 43 percent of the retailer’s stock. However, Charney ceded his voting rights to Standard General when he borrowed $20 million from the firm as part of a deal to bolster his equity position in American Apparel.

American Apparel shares on Wednesday closed higher by 1 cent to 85 cents on the NYSE.