B. Riley Financial, the Westwood-area financial services firm, said Monday that it has sold a majority stake in its Great American appraisal and liquidation business for nearly $400 million — a move meant to lower its debt as it struggles with the fallout from a deal that turned sour.The deal with Oaktree Capital Management will earn the company about $203 million in cash and a 47% stake valued at roughly $183 million in a new holding company it is forming with Oaktree. A Los Angeles global investment manager, Oaktree specializes in distressed assets.“I am pleased to be partnering with Oaktree given its stellar track record and reputation as one of the world’s leading asset managers,” said Bryant Riley, chairman and co-chief executive of B. Riley. “This transaction is an important step in our plan to reduce our debt while reinvesting in our core financial services business.”B. Riley shares were up 25% to $5.52 in early morning trading on the Nasdaq. The firm had seen its stock drop more than 90% since it underwrote a $2.8-billion management-led buyout last year of Franchise Group, a Delaware, Ohio, company that operates Vitamin Shoppe, Pet Supplies Plus and other retailers. Franchise Group’s sales have slowed, its bonds are rated as junk and its founder, Brian Kahn, has been tied to the collapse of Prophecy Asset Management, a hedge fund that federal prosecutors allege defrauded investors of $294 million.B. Riley took on $600 million in debt to underwrite the deal and lent Kahn $200 million to establish and take Franchise Group private — with most of the loan secured by shares of Franchise Group. Bryant Riley said last month the firm had lowered its debt related to the deal to about $380 million and was carrying $1.9 billion in total debt.The Securities and Exchange Commission has issued subpoenas to B. Riley as it probes the firm’s relationship with Kahn, 50, who resigned as chief executive of Franchise Group but has not been charged with any crime and has denied any wrongdoing at Prophecy.John Hughes, Prophecy’s co-founder, pleaded guilty Nov. 2 to conspiracy to commit securities fraud. Riley, 57, has denied knowledge of any alleged wrongdoing at Prophecy. An outside law firm also concluded neither he nor others at the financial services firm had involvement with or knowledge of any wrongdoing at Prophecy, which had offices in New York and South Carolina.But the scandal has threatened Riley’s 27-year-old firm, which advises on mergers and acquisitions, handles stock offerings and provides investment research and other services for its mostly small- and mid-cap client companies. In August, B. Riley marked down its investment in Franchise Group by up to $370 million and expects to record a loss of up to $475 million in the second quarter, when it files its delayed earnings. After posting record profits and revenue in 2021, the company has lost money the last two years.In order to conserve cash, B. Riley suspended a dividend that paid its founder $27 million last year and renegotiated some debt. Riley also offered to take his company private at $7 a share, which a board committee is considering.B. Riley primarily offers financial services, but it has made investments in consumer companies, starting in 2016 with legacy internet service provider United Online. The company also acquired and repositioned the brands of faded apparel companies, including girls clothing brand Justice, now sold in Walmart.The Great American deal is part of a strategy to lower its debt that also includes the sale of its apparel brands, which has yet to be announced.B. Riley Financial was formed in 2014 by a merger of Riley’s private held stock firm with Great American, which was public at the time.