'The Lego Movie' is built to end in a surprise

The Man Upstairs, voiced by Will Ferrell, in a scene from "The Lego Movie."

The Man Upstairs, voiced by Will Ferrell, in a scene from "The Lego Movie." (Warner Bros. Pictures)

Steve Zeitchik

Of the many unexpected moments in Phil Lord and Chris Miller's breakout hit "The Lego Movie," perhaps none is as surprising as the film's ending, which is daring even by the standards of this unconventional film.

So daring, in fact, that even its filmmakers weren't sure they could get away with it.

"We were terrified," said Miller. "We didn't know if you would care about the universe once you understood how the universe worked," alluding to how the movie turns itself inside-out at the end.

In a season in which the typically tricky art of the movie ending has largely satisfied — witness the well-regarded twist in "American Hustle," the Quaalude-enabled piece de resistance of "The Wolf of Wall Street" and the return-to-Earth redemption of "Gravity" — the finale of "Lego" may top them all.

Warner Bros., which financed and released "The Lego Movie," was also unsure about the finale and for a time pushed the filmmakers to consider a more conventional path. It had reason for hesitating.

[Spoiler alert: The following passages contain details about the film's ending.]

Just when audiences think they've seen it all — Abraham Lincoln exasperatedly leaving a convocation that includes the Green Lantern and Shaquille O'Neal will have that effect — the movie quite literally separates from itself, as hero Emmet (Chris Pratt) and the entire movie that preceded it is revealed to be the figment of a young (live-action) boy's fertile mind.

All that's happened — the use of Krazy Glue as a weapon, the God-like power of Morgan Freeman's Vitruvius, a kitchen-sink ensemble that also includes Batman and the Teenage Mutant Ninja Turtles — has happened because the boy, a basement-playing child named Finn, took the ordinary and turned it into the stuff of epic storytelling.

The villain? He's inspired by the boy's stern father, referred to as the man upstairs in the animated section because he, of course, lives upstairs. At the film's end, the man (Will Ferrell) comes down to the basement and lets the boy have it for playing with his Lego kits, though the two eventually find common ground. It would all be as if, at the end of "Gravity," Sandra Bullock turned to the camera and said she had imagined the whole space adventure and has been on Earth the entire time.

Noting as inspiration the series finales of "St. Elsewhere" and "Newhart" (both '80's shows ended with the suggestion that all that came before was the product of someone's imagination), Lord and Miller said they believed that their ending played directly to the film's message.

"The kid is making connections that adults aren't making," Lord said. "He's making connections you can't make as you get older and your thinking gets more rigid. And we couldn't really set up that dichotomy without including the last scenes." He added, "It just seemed intrinsic to the concept."

Audiences have certainly responded — they gave the movie an "A" CinemaScore and turned out in droves to see it again last weekend, ensuring that it won the box-office crown for the second weekend in a row. The film has collected a whopping $146 million in just 12 days of release.

The numbers may be validation for the filmmakers' approach to the ending but, during post-production, studio executives weren't convinced. They wondered if the surprise was too meta for kids and the twist too jarring for everyone else, according to a person close to the production who asked not to be identified because of the sensitive nature of the issue. But Lord and Miller held their ground, the person said, and the studio relented.

The ending had an unusual beginning. Dan and Kevin Hageman, the project's initial writers and the men who sold the Lego company on the concept of film, also included a switch to live action at the end of their script. But their draft didn't include, as Kevin Hageman put it, an "epic meta twist." Instead, the story shifted to real-life people without suggesting that all that came before was in the mind of one of the characters. When Lord and Miller came on, they upped the ante and introduced the rug-pull.

"It's such a jarring twist, one of those things that can turn super-schmaltzy," Dan Hageman said. "But it also is what the movie is about, this idea of childhood and adulthood, of fathers and sons, which is why I think it works."

Shooting the ending required a very different use of the film's actors. Ferrell was already cast, playing the voice of the animated movie's antagonist Lord Business. Lord and Miller then found a child actor named Jadon Sand to play Finn; his wide-eyed innocence and dark-haired curls suggested a boy who might mentally create the adventures seen in the film. Ironically, Sand had worked previously as an unseen voice in animated films, including "Wreck-It Ralph" and "Frozen."

The scenes also required another set of skills, drawing on Lord and Miller's background directing the live-action "21 Jump Street" and the movie's upcoming sequel, in addition to their animation bona fides on the animated franchise "Cloudy With a Chance of Meatballs."

Even after production wrapped, the ending presented challenges. Producer Dan Lin noted the task of keeping it a surprise during promotional efforts — not easy in a world where blog posts can reveal a movie's intimate plot points and social-media can carry them around the world with blazing speed.

Though the main coup comes with the suggestion that the film was the product of someone's imagination, filmmakers couldn't resist other wrinkles. They hinted, for instance at a sequel by introducing the idea of Finn's sister, who loves the younger-skewing toy Duplo, also made by Lego.)

Adding to the father-son theme, the voice of Finn's sister is played by Miller's own son, his high voice at the time sounding a bit more girlish.

So are Lord and Miller happy with the meta-universe they created? "What we kind of wanted to go for throughout the movie was ask questions about why characters are behaving this way," Lord said. "We spent a lot of time trying to figure out the right tone and level of magic, whether there really is a Lego universe where toys are alive or it's just someone's imagination. So yes. I think so." He paused. "I hope so."