When “Lord of the Rings: The Fellowship of the Ring” opened on Dec. 19, 2001, it was the culmination of one of the most audacious and successful bets ever made in the movie business. The three films in the series were shot back to back and grossed $2.9 billion dollars — not bad for a trilogy that very nearly didn’t get made.

Why did it take so long after the J.R.R. Tolkien books were published to see a “Lord of the Rings” film? And how did Peter Jackson, who wasn’t a well-known director at the time, end up directing all three? Here are some of the steps it took to put “Lord of the Rings” onscreen.

Hippies helped the Hobbits: The books were published starting in 1954 in England, but didn’t become popular in the U.S. until the mid-1960s, at the height of the Vietnam War, when war protesters and back-to-the-earth hippies ruled the cultural airwaves. The books became counter-cultural touchstones thanks to their themes of environmental protection and battles against forces of war and corruption.

Related Stories

Tolkien was flattered by the success and amazed by the profits. But he was born in 1892, and couldn’t get his head around fans whose idea of a great trip was to ingest “The Lord of the Rings” and LSD simultaneously. Plus, over-enthusiastic readers were invading his privacy, gawking at his house and calling him at all hours with obscure questions.

Popular on Variety

The influence grew: Themes from the book were reflected in music by groups such as Led Zeppelin with their song “Ramble On,” and writers including Clive Barker and Stephen King were strongly influenced by Tolkien. George Lucas has often cited the books as an important influence on “Star Wars.”

An animated attempt: After “One Flew Over the Cuckoo’s Nest” producer Saul Zaentz acquired rights to the books, animator Ralph Bakshi made a feature-length animated film, “J.R.R. Tolkien’s Lord of the Rings.” But until the mid-1990s, when digital special effects started to become more widespread, it was thought the vast mythological universe of elves, Hobbits, wizards and monsters would be too daunting and expensive to reproduce on film. Filmmakers including George Lucas, Steven Spielberg and John Boorman considered trying to adapt the books but ultimately didn’t follow through.

Enter Peter Jackson: While Jackson, a longtime Tolkien fan, was filming his first studio film “The Frighteners,” for Universal, he began considering whether the many recent advances in visual effects might finally make it possible to adapt “The Lord of the Rings” trilogy on film for a reasonable amount of money.

Jackson was obligated to bring any project he was considering to Disney-owned Miramax first. It was rumored that Tolkien had included a clause when he sold the rights to the books that any films were not to be made by Disney. Jackson said that he has heard that this was because Tolkien disliked Disney’s 1937 “Snow White and the Seven Dwarfs” — but in the end, Harvey Weinstein-run Miramax ended up making the deal anyway.

It almost wasn’t Jackson: Jackson thought one way to handle the trilogy would be to make “The Hobbit,” the prequel to the trilogy, first, and then make two films of the next three books. But rights issues meant that Saul Zaentz could only license “Lord of the Rings” to Harvey Weinstein, and not “The Hobbit.” When production costs started to rise, Harvey Weinstein tried to persuade Jackson to make a single “Lord of the Rings” film. Weinstein gave Jackson an ultimatum: “We had to either agree to do it or walk away,” Jackson recalled, “He already had John Madden lined up to direct, and Hossein Amini to write the script.”

But nobody was interested: Jackson returned to New Zealand to start working on a 35 minute “making of the making of” sample footage video, which would be shown to studios that expressed interest. But no major studios got the chance to see the footage — they all turned Jackson down. It came down to appointments with Polygram — the British independent studio whose Working Title label made “Four Weddings and a Funeral” — and New Line, on the same day Jackson was scheduled to fly back to New Zealand. New Line came through, after Weinstein negotiated an expensive buyout including an executive producer credit.

A whole new scale: It was a production of unprecedented scope: no filmmaker had ever made three films back to back before, or had as large a cast of crew and extras, or made every single prop from scratch. A production team of over 2,400 and 26,000 extras worked on the films for five years. The crew built 64 miniature sets, some so detailed that the larger ones were known as “bigatures.” Jackson decided that every single item in Middle-earth should be made from scratch. “I had to create the most believable world I could. The decision was to make it feel very historical, with the levels of detail creating the illusion that the viewers were immersing themselves in a real world,” said Jackson.

Breaking records: Some of the sets and props were among the most detailed ever made for any film — the walled white castle city of Minas Tirith was the largest set ever built in the Southern Hemisphere, and functioned as a working small city. The huge, elephant-like Mumakil, was the largest prop ever built, and had to be transported to the set in pieces in more than a dozen trucks.

Hobbit habitats: In Hobbiton, a vegetable garden was planted a year before filming, to make the domestically gifted Hobbits look at home. Props included more than 900 suits of hand-made armor, more than 20,000 household and everyday items and more than 1,600 pairs of individually-sized prosthetic feet and ears.

Groundbreaking effects: For the first time on any film, a massive computer database stored every single frame shot in a digital library that could instantly access, analyze and cross-reference any single item appearing in the film. Every element in the trilogy could be subject to digitally manipulated, from landscapes to Hobbits and horses.

Battle crowds: Weta’s proprietary crowd behavioral simulation software, dubbed Massive, helped to build the huge battle scenes in The Fellowship of the Ring. Every individual character in the crowd moves in response to the its environment and the actions of other characters.

The search for Gandalf: New Line encouraged Jackson to cast Sean Connery as Gandalf, and though Jackson, a fan of Connery’s agreed, Connery turned them down. Ian McKellen was the next choice for the role of the wise wizard. But McKellan had committed to appear in “X-Men.” Bob Shaye ran into him at a London restaurant and told him “I was sorry to hear he was busy, because we had really wanted  him. I went back to my table, and then a few minutes later, I decided to go back and ask, ‘Just for the record, what is the scheduling conflict?’ He said, ’Well, you’re starting ’Lord of the Rings’ three days before I finish ’X-Men.’ We did fix it of course, and that’s how he got in the movie.”

Not the right fit for Aragorn : The actor cast for the role of Aragorn, Stuart Townsend, was replaced after the first film was already three or four weeks into shooting. He was in nearly every scene, and they all needed to be re-shot. Producers felt the actor needed a little more gravitas, and decided to replace Townsend with Viggo Mortensen. “We had five days in which to find and cast the right person, make the deal and get him on a plane for New Zealand — for 15 months!” said executive producer Mark Ordesky. Mortensen, who is 14 years older than Townsend, seemed born to shoulder the role of the mysterious human warrior — it was even said he was living in the forest in Aragorn’s mud-stained clothes.

An unknown quantity: No one knew how the film would be received until 26 minutes was shown at the Cannes Film Festival in May 2001. “Media reaction ranged from upbeat to wildly enthusiastic,” reported Variety. The party, too, was one of the festival’s best: “It‘s hard to remember a pic with a splashier launch here,” Variety wrote. Party guests marveled at the walk-through Hobbit house, the swan boat floating in the misty swimming pool, and performers dressed as Middle Earthlings distributed throughout the castle’s expansive grounds.

No testing necessary: When “The Fellowship of the Ring” was released on Dec. 19, 2001, September 11 was fresh in viewers’ minds. Films mentioning terrorism, the World Trade Center and airplanes were put on hold. Filmgoers were in the mood for pure escapism, preferably stories with strong heroes. The film was never pre-previewed or tested with audiences, Jackson noted.

Fans were key: “During our whole process of production on the film, we would stay in touch with the core fans all around the world through these Internet sites, even involve them in the process as casting ideas arose, getting feedback from them,” said New Line’s Michael Lynne. “Peter was one of those crazy, goofy fans, so he understood that.” To the delight of hundreds of devoted fans, Jackson and several cast members showed up at the Oscar night fan celebration down the street from the Oscars at the parties for both “Fellowship” and “Return.”

More from Variety