Warner Bros. will handle worldwide distribution on “The Hobbit,” taking over international distribution and homevideo on the two films from MGM in exchange for funding MGM’s half of the production costs.

Deal calls for MGM to continue handling international television licensing for the films and for MGM and Warners to work collaboratively to coordinate marketing and release plans worldwide.

MGM, Warner Bros. and Warner’s New Line unit made the joint announcement Thursday, with director Peter Jackson still set to start shooting in 3D next month in New Zealand and release of the two “Hobbit” pics aimed for December 2012 and December 2013.

The studios did not disclose specific further terms of the deal, however. A source close to the situation said Warners will provide funds for MGM’s obligation on production costs, with the funds to be repaid through MGM’s share of “Hobbit” revenues.

Announcement comes two weeks after MGM secured $500 million in exit financing to ramp up operations as part of its pre-packaged bankruptcy to eliminate more than $4 billion in debt. The bankruptcy filings indicated that MGM was seeking a separate loan of $265 million-$275 million to finance its half-share in the two “Hobbit” films.

Both studios were motivated to make the deal because Warners is in a far better position to handle a franchise film outside the U.S. MGM’s distribution and marketing operations have been mothballed for the past two years with a total of two releases, while Warners has been Hollywood’s most successful studio during that period thanks largely to tentpoles such as the sixth and seventh Harry Potter pics and “Inception.”

MGM’s already made two recent cost-cutting moves — signing to leave its namesake MGM Tower in Century City for new digs in Beverly Hills and pinkslipping about 45 employees, a reduction of more than 10% to its staff of 400.

The MGM-Warner distrib deal doesn’t affect MGM’s half-ownership rights to any additional “Hobbit” films should the studios decide to make them.

Jackson, Fran Walsh and Carolynne Cunningham are producing the films, with co-writer Philippa Boyens serving as co-producer and Ken Kamins and Zane Weiner as exec producers. Cast includes Martin Freeman as Bilbo Baggins and Cate Blanchett reprising her role from the “Lord of the Rings” trilogy as Galadriel.

“The Hobbit” films received a greenlight on Oct. 15. New Line, MGM and Warner Bros. (parent of New Line) agreed three years earlier to partner on a bigscreen version of J.R.R. Tolkien’s epic fantasy novel about the adventures of Bilbo Baggins and how he obtained the ring that became the centerpiece of “The Lord of the Rings” trilogy.

The studios reached a settlement agreement in late October with the New Zealand government, which agreed to change its labor laws and sweeten production incentives in exchange for keeping “The Hobbit” shoot in that country.