EXCLUSIVE: STXfilms is closing a high seven-figure multi-territory pre-buy for the Scott Cooper-directed psychological horror A Head Full of Ghosts, which will star Margaret Qualley (Once Upon a Time in Hollywood).

STX will distribute in the U.S. and UK and, like it did on Gunpowder Milkshake last month, teamed with its output partners in Latin America (Sun), Canada (Elevation) and Benelux (The Searchers) to acquire those markets as well. Partnering up gives the buyers a better chance of fending off the deep-pocketed streamers.

The film is backed by Cross Creek, Team Downey and The Allegiance Theater. CAA Media Finance repped U.S. rights while Mad River launched foreign sales at the European Film Market in Berlin last month.

Pic is an adaptation of Paul Tremblay’s popular horror novel, and Cooper is revising the current draft. The film sees a young woman recount to a journalist the terrifying story of how her family was publicly ripped apart 20 years prior by her teenage sister’s mysterious affliction. Additional casting is underway.

Berlin turned out to be a buoyant market in the end. Certainly at the top end. Between Netflix’s splash for The Good Nurse, Searchlight grabbing Perfect, AGC’s sell-out on Little America, STX’s deals for this film and Gunpowder Milkshake and multiple eye-catching deals on its sales slate, it was a better than average EFM. The hope has been that Cannes could follow suit.

Qualley is also coming off Fosse/Verdon, The Leftovers and Berlin opener My Salinger Year. Cooper most recently directed the Keri Russell-Jessie Plemons movie Antlers.

A Head Full of Ghosts is being produced by Daniel Dubiecki and Lara Alameddine of the Allegiance Theater, Susan Downey of Team Downey, Tyler Thompson of Cross Creek, Cooper and David Gambino. Robert Downey Jr is exec producing.

The film marks the second collaboration for Cooper and Cross Creek, after the 2015 Johnny Depp-starrer Black Mass for Warner Bros that grossed $99M million worldwide. Cross Creek’s other forays in the psychological thriller space include Black Swan and Woman in Black. Cross Creek just wrapped the Aaron Sorkin-directed Trial of the Chicago 7, with Paramount releasing in the fall, and the Vin Diesel-starrer Bloodshot.