2ND UPDATE:  The new MGM brass, Gary Barber and Roger Birnbaum managed to leverage the James Bond #23 film for a piece of Sony’s in-the-works big movie based on the Stieg Larsson bestseller, The Girl With The Dragon Tattoo, which has already been shooting in Sweden under director David Fincher and starring Rooney Mara. Deadline has learned that Sony Pictures bosses Amy Pascal and Michael Lynton agreed to give MGM a co-financing deal for the big title and possibly other films already shooting, too, to help the reconstituted studio generate quick cash flow. This allows MGM to have revenue which it hasn’t had in a long time, so the books look better, and more funds for production could be forthcoming. (That’s exactly how Birnbaum and Barber built their Spyglass Entertainment in the first place: by investing in films it didn’t make, like the recently rebooted Star Trek.)

UPDATE: We’re told Paramount dropped out of the Bond bidding when MGM insisted on bringing the distribution fee under 8% and when MGM got “grabby” in wanting a piece of a Paramount established franchise that studio didn’t want to give up.

EXCLUSIVE 5 PM: Deadline hears that Sony Pictures is close to landing distribution rights to MGM’s James Bond franchise again, and specifically for the next untitled Bond #23, even though several studios are still very much in the hunt. Sony Pictures chiefs Amy Pascal and Michael Lynton distributed both Daniel Craig 007 pics, Casino Royale and Quantum Of Solace, and now have moved into first position to recapture 007. That’s because Sony is agreeing to allow MGM’s new leadership to leverage the next Bond pic, and indeed the Bond franchise, to create more cash flow for the reconstituted studio post-bankruptcy. The new brass, Spyglass Entertainment co-owners Gary Barber and Roger Birnbaum who are now the Co-Chairmen andCEOs of Metro-Goldwyn-Mayer, are finishing negotiations to co-finance a number of films with Sony. Deadline has learned that Pascal and Lynton have already found a title on the Sony slate for MGM to co-finance. That’s exactly how Birnbaum and Barber built Spyglass in the first place: by investing in films it didn’t make, such as The Sixth Sense and the recently rebooted Star Trek.

There’s no doubt this is a shrewd move by MGM, but Deadline also learned it wasn’t sitting well with the majors. Top execs at Sony and Fox and Paramount and Warner Bros were increasingly frustrated with the way that the Spyglass duo were playing one studio off another — “and enjoying it,” in the words of one exec involved. Sony at the time even described its strategy to win Bond #23 as ”pleading”. Now it looks like that worked along with agreeing to much of MGM’s negotiating terms.

Even though MGM holds sway on where Bond #23 lands, a 007 return to the Sony fold would please EON partners Barbara Broccoli and Michael Wilson. Amy Pascal in particular has developed a strong personal and professional relationship with Broccoli when they were making the transition from Pierce Brosnan to Daniel Craig. Broccoli  and Wilson found Craig among a list of possible 007s, and the choice wasn’t popular at first. But Pascal supported Craig. Also Sony has a reputation for spending big to market Bond: for Casino Royale, Sony spent a humongous sum worldwide to introduce the new Bond. MGM was supposed to distribute the 23rd Bond film itself, until the studio was pushed into bankruptcy.

We’ve told you already that studios including Fox, Paramount, and Warner Bros as well as Sony have been vying to distribute Bond in a series of tough negotiations with MGM’s Barber and Birnbaum. We wouldn’t yet count out Fox and Paramount — the latter has a strong relationship with the Spyglass duo built on Star Trek and its sequel — but things are looking good for Sony. As Deadline previously reported, MGM wanted to make an overall deal for worldwide theatrical and home entertainment distribution of not just Bond but also MGM’s new product as well as its library of films. But what wasn’t known is that, as part of that deal, MGM sought from whichever studio is chosen to distribute Bond #23 an agreement to co-finance a number of films. ”That would provide MGM quick cash flow,” an insider told Deadline. “The quick cash flow allows MGM to have revenue which it hasn’t had in a long time. Thereby their books look better, and therefore the possibility of getting more funds for production is increased. So expect whichever studio lands Bond to also announce it is several co-financing deals allowing MGM into other pics that are already shooting.”

Broccoli and Wilson had been in pre-production on Bond #23 for release on November 9, 2012. But then it took almost a year for MGM’s future to sort itself out what with the failed auction sale of the studio, then the pre-packaged bankruptcy getting approval, and eventually Spyglass taking over studio filmmaking. Daniel Craig will be returning as the legendary British secret agent, with Sam Mendes directing a screenplay written by Neal Purvis, Robert Wade and John Logan. That script is being kept under wraps but the story begins after Quantum Of Solace leaves. Bond #23 already is casting up, as Deadline revealed that director Sam Mendes recently offered the villain role to Javier Bardem. There are unconfirmed rumors that Slumdog Millionaire‘s Freida Pinto is under consideration as a possible Bond girl.