Marking the first slate financing arrangement to close since the financial meltdown of 2008, 20th Century Fox has made a deal for just north of $400 million to help fund nearly all its films over the next five years, including the next two “Avatar” pics, multiple sources have confirmed to Variety.

Financial guru Chip Seelig brought the coin to Fox, and it’s not the first time he’s raised a sizeable amount of money for the studio, either: The pair have a relationship dating back to 2005, when Seelig arranged a $400 million slate deal as a then-partner of financial firm Dune Capital Management. Seelig left Dune about 18 months ago to start new funding ventures.

The latest deal effectively replaces the longstanding Dune structure, which has been renewed a number of times since its flagship run. Although Dune will continue to earn money from Fox films it’s helped pay for (And can re-invest that money into future studio pics), the Gotham-based firm has elected not to renew its co-financing pact, according to topper Steven Mnuchin. Dune is also in the middle of a refinancing that could put more money into Fox pics, as Variety reported in August. At that time, both sides appeared to be close to yet another extension of their relationship.

New deal also marks Fox’s first major financing under the sole chairmanship of Jim Gianopulos, who took over running the studio after co-topper Tom Rothman left his post at the end of last year. The duo ran the studio at the time of its first pact with Dune.

Magnetar Capital provided a chunk of the funding in Seelig’s latest arrangement, a source with knowledge of the transaction confirmed, and it’s understood that the Chicago-based group provided the majority of the money. As part of the arrangement, Seelig will put some of his own equity into the slate.

Seelig’s investors will participate in almost all of Fox’s films for the next five years, according to multiple sources close to the deal. Studio will typically take an 11% distribution fee, according to those briefed on the matter, and investors will usually have the option of funding between about a quarter and half of the budget per film. Deal does not include animated fare and certain smaller-budgeted pics, as is typical for Fox.

Seelig’s departure from Dune left oversight of the Fox relationship to Mnuchin, a former Goldman Sachs fund manager who also serves as chairman of One West Bank. Mnuchin and Seelig have a long history together, both from their time at Dune and at Goldman, where Seelig also worked.

Seelig is also currently holding discussions with banks about putting between $300 million and $400 million of senior debt into the deal, according to sources close to the talks. And the overall pot of money could grow, as Seelig will continue his fundraising efforts in the hopes of a longer-term partnership.

Fox has its eye on the long-term too. In Dune, the studio counted one of the longest-running modern financing partnerships of any of the majors. Dune participated in the first “Avatar,” and the relationship is widely considered to be one of the most successful co-financing pacts from the last few years. Some observers credit that to a lack of mezzanine financing in the deal’s structure, others to Dune’s access to Fox’s slate – since the fund could participate in just about any film, a juggernaut like “Avatar” and other hits more than helped make up for misfires.

As is typical for investors, Dune will earn money from its Fox library for years, although the firm has held some discussions with Fox about the studio buying out those future cash flows.

Seelig’s deal is the first slate financing arrangement to be completed in years. It also comes at a time when all the majors, with the exception of Disney, are aggressively pursuing outside cash. But capital markets have shrunk, and large-scale equity has vastly dwindled since the slate heyday of between 2005 and 2009, when every studio nabbed hundreds of millions of dollars from third parties.

While all the majors are meeting with potential investors, none appear close to a deal.

Sony and Universal are still talking to a group led by attorney John LaViolette that hopes to have around a billion dollars to divide between the studios, as Variety reported in March. But observers are mixed on whether an arrangement is likely to materialize.