A U.S. judge on Monday said he would approve American Apparel 's plan to exit bankruptcy and rejected a takeover attempt from the teen retailer's founder and ousted chief executive, Dov Charney.

The ruling by U.S. Bankruptcy Judge Brendan Shannon clears the way for hedge funds including Monarch Alternative Capital to control the operator of more than 200 stores when it exits Chapter 11.

Los Angeles-based American Apparel Inc, known for its "Made in the U.S.A." fashion and sexually charged advertising, filed for bankruptcy in October, blaming changing tastes and too much debt. The reorganization plan that Shannon approved would cut more than $200 million of debt and provide a cash boost.

REALTED: Founder Dov Charney is the big loser in American Apparel bankruptcy

Under that plan, the company expects to be profitable in 2018, which would be the first time since 2009.

Charney attacked the plan by pointing to tanking sales and gross profits since he was fired in December 2014. He argued the company needed his innovation and creativity to thrive.

In December, Charney, Hagan Capital Group and Silver Creek Capital Partners presented a $300 million takeover, which they said put a richer value on the company. The bid was rejected by the company's board earlier this month.

Shannon said he had no doubt Charney and Chad Hagan of Hagan Capital genuinely wanted a chance to bid for American Apparel. However, the judge said the company is not obligated to put itself up for sale when it has a bankruptcy exit plan that has been approved by all classes of creditors.

Shannon's decision followed a two-day trial last week to determine if the company's plan was fair and feasible. It featured two hours of animated testimony from Charney, who seemed to relish his story of founding the company as a Montreal teenager and expanding it into a publicly traded corporation that employed thousands. He still seemed incredulous over what he called the "blackmail" that led to his departure.

RELATED: American Apparel finds CEO misused funds; allowed naked photos of former employee

In the end, Charney's testimony may have been too much of what the judge called "free associating" and too little focused on relevant issues. American Apparel's lawyers did not even bother to cross-examine him.

Charney was fired in 2014 for allegedly misusing company funds and failing to stop a subordinate from defaming former employees. He has denied the allegations.

The company has blamed its bankruptcy in part on millions of dollars spent settling legal claims, including for sexual harassment, against Charney.