In its glory years, Metro-Goldwyn-Mayer was a Hollywood hit factory that churned out golden classics such as Mutiny on the Bounty and The Wizard of Oz. But the US entertainment empire is to declare itself bankrupt this week under a pre-arranged deal with creditors to shed a crippling debt burden of more than $4bn (£2.5bn).

After a year of wrangling over the troubled studio's future, lenders to MGM are set to seize as much as 95% of the company, under a financial restructuring to be put before a bankruptcy judge in Los Angeles for approval.

Once in control, creditors intend to install the founders of a far smaller production company, Spyglass Entertainment, to run a slimmed-down version of MGM in the hope of reviving its fortunes. Spyglass bosses Gary Barber and Roger Birnbaum are responsible for hits such as The Sixth Sense and the recent Russell Brand comedy Get Him to the Greek.

Insolvency amounts to a humiliating comedown for a studio with a back catalogue of 4,000 titles holding 205 Oscars between them. Financial paralysis has seen movie production grind to a halt: MGM's only significant release this year was a raunchy comedy, Hot Tub Time Machine, that bombed at the box office.

Industry watchers say this week's tentative deal to put the company through a swift bankruptcy could pave the way for filming to restart. That bodes well for James Bond fans: work on a 23rd movie about Ian Fleming's debonair spy has been frozen since April while MGM, which owns the Bond franchise, sorts out its problems.

"This offers a chance for MGM to move forward," said Neil McCartney, chairman of the Independent Film Trust, a UK charity. "The problem is that the company's been paralysed for some time because of disputes over its future. The deal at least provides a way out by letting creditors take over the company."

The Bond series, said McCartney, was one of MGM's most valuable assets, along with a part share in two upcoming films of JRR Tolkien's The Hobbit: "The creditors will be looking to get their $4bn back and the only way to do that is for the company to make money. The only way it's going to make money is by making new films."

Daniel Craig, the star of the Bond films, has made no secret of his impatience to make a follow-up to 2008's Quantum of Solace; he said recently that he was "champing at the bit" to get going.

Famous for its roaring lion logo, MGM has changed hands frequently in recent decades. Its owners have included drinks magnate Edgar Bronfman, the Las Vegas casino billionaire Kirk Kerkorian and CNN's founder Ted Turner. Critics say it has been milked as a cash cow and starved of long-term strategic thinking.

The 86-year-old studio has been laden with debt since a 2005 buyout by a consortium including Sony, Comcast and private equity firms Providence and TPG, and was due to make a long-delayed $450m repayment on Friday. Its lenders include major banks such as JP Morgan Chase and Credit Suisse, plus a billionaire corporate raider, Carl Icahn, who specialises in making money out of distressed companies and who has been agitating, unsuccessfully, for a merger with MGM's rival, Lionsgate.

MGM has been up for sale since November but offers, including a bid of about $1.5bn from Time Warner, were too low to pay back the studio's debt.