Metro-Goldwyn Mayer said its lenders agreed to loan the studio $500 million to retire debt it took on when it emerged from bankruptcy about a year ago and to expand its film and TV production.

The revolving credit facility replaces a term loan and smaller revolving facility the studio received as part of a prepackaged bankruptcy and will improve its cash flow to allow the studio to acquire content, Co-Chairman and Chief Executive Officer Roger Birnbaum said.

A year ago we were struggling to get films made, said Birnbaum, who runs the studio with Co-Chairman and CEO Gary Barber. Now we have the financial strength to make acquisitions not only in film and TV but other areas as well. He did not specify the other areas on which MGM might focus.

The loan replaces a $325 million term loan with a 6.5 percent rate and a $175 million term loan, according to people familiar with the borrowing. The new loan carries an interest rate of about half the 6.5 percent rate, the person said.

MGM will use the funds to produce the next James Bond installment, Skyfall, in partnership with Sony Pictures and a pair of movies based on The Hobbit that it will make with Warner Brothers, the company said. It also plans to make films based on movies from its library, including Robocop, Carrie, and Poltergeist.

The loan was arranged by a syndicate headed by JP Morgan Chase and Deutsche Bank and includes Bank of America Merrill Lynch, Royal Bank of Canada and Union Bank, among others.

(Reporting by Ronald Grover; Editing by Andre Grenon and Richard Chang)