It’s hard to talk around the spoilers, so if you’ve seen Split, please continue on. Learn how filmmaker M. Night Shyamalan convinced Walt Disney Pictures to allow him to do the much-talked about twist at the end of his new Universal distributed thriller Split, and what that might mean for the possible sequel now that the movie is a gigantic hit.

Split spoilers are coming up.

You’ve been doubly warned.

So if you’ve seen Split, you know the film ends with a big surprise cameo from Bruce Willis, reprising his role as David Dunn from M. Night Shyamalan’s 2000 film Unbreakable. That movie was released by Touchstone Pictures, a subsidiary production company of the Walt Disney Company. So you might be wondering how Shyamalan was able to get the rights to use a character from a film produced by another studio. Deals of this kind are rare in Hollywood, especially when there is no financial gain.

Wall Street Journal finally has the story on how the deal went down. According to the paper, Shyamalan called Disney’s president of production Sean Bailey in 2015 asking to make a brief reference to Unbreakable in a new movie he was writing for Universal.

Mr. Shyamalan had a long relationship with Mr. Bailey and his boss, Disney studios Chairman Alan Horn. The director described himself as “naively optimistic” about the request but his efforts panned out. Disney allowed Universal to use Mr. Willis’s character free, as a sign of good faith. The likelihood of it being a hugely valuable favor seemed low. “Split” was made by Blumhouse, a production company known for low-budget horror movies that don’t need to do blockbuster business to turn a profit.

Now, of course, I don’t think Disney expected Split to become one of Blumhouse’s highest-grossing movies. And now that it is such a huge financial success, and with word that Shyamalan is working on a sequel that would incorporate characters from both Split and Unbreakable, one has to wonder how Disney would be involved in said movie. Well, apparently when Shyamalan asked permission for the Split appearance he assured Bailey that “if we do a future thing, we’ll figure that out.” Now Disney is expecting to work with Universal “as a partner, and participant in the profits” of this proposed sequel, according to a person close to the company.

The Mouse House has yet to sign a deal for the sequel, but if there is money at the end of that signature, you will be they will sign on the dotted line. Disney will likely look at the script once it’s completed before making a partnership with Universal on the sequel, whatever it ends up being titled. Shyamalan has already finished an outline for the proposed sequel.

In a previous interview, Shyamalan revealed that while he doesn’t own the rights to his movies and characters, he controls the rights to possible sequels based on the movies he’s made. So it’s not like Disney or Universal could make an Unbreakable or Split sequel without him anyways.