Jackson was just as shocked by Bruce Willis' appearance in "Split" as the rest of the world.

M. Night Shyamalan is known for his twist endings, but even his most loyal fans were shocked by the ending of his 2016 psychological thriller “Split.” The movie ended with the reveal that “Split” existed in the same universe as Shyamalan’s 2000 superhero movie “Unbreakable.” Bruce Willis, who played protagonist David Dunn in “Unbreakable,” appeared in the final minutes of “Split,” bringing two of Shyamalan’s most popular films together and all about ensuring a sequel involving characters from both.

The sequel is titled “Glass,” and it turns out Samuel L. Jackson had no idea Shyamalan was readying the “Unbreakable” sequel until he saw “Split” himself. Jackson played the villainous Elijah Price in “Unbreakable,” a man with brittle bone disease who makes it his life mission to find a worthy hero to face off against.

Shyamalan wrote and directed “Unbreakable” with every intention of making a sequel, but his dreams of doing so were killed once the movie underwhelmed at the box office. By sneaking in Willis’ Dunn at the end of “Split,” Shyamalan was able to make good on his promise. “Glass,” opening in 2019, will find Dunn facing off against the multiple personality-stricken Kevin, played by James McAvoy in “Split.” Jackson’s glass will once again be pulling strings between the forces of good and evil.

“I remember Night called me last year to say, ‘I need you to watch this movie I just made, and after you watch it, I’ll tell you what I’m thinking,’” Jackson told Vulture. “So I watched ‘Split,’ and at the end of it, we get Bruce in the café and the woman talks to him about Mr. Glass.”

Jackson remembered gasping in shock at reveal. He called Shyamalan back soon after in disbelief and wondering if an “Unbreakable” sequel was finally on the table.

“I was like, ‘So are we gonna make this movie?’ And Night says, ‘Well, it depends on the opening weekend,’” Jackson said.

“Split” ended up opening to $40 million at the U.S. box office and grossed over $270 million worlwide, making it Shyamalan’s biggest movie in almost 20 years. The success ensured an “Unbreakable” sequel would finally get made.

“Glass” will unite Jackson, McAvoy, and Willis, plus Sarah Paulson and Ana Taylor-Joy. Production on the film wrapped earlier this year, and Jackson is already raving about how “amazing” McAvoy’s performance is in it. The movie is scheduled to open January 18, 2019. Head over to Vulture to read more from Jackson’s interview.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.