NEW YORK (AP) — The return of dragons on the small screen has been a huge hit. Now it’s time for the return of the elves and dwarves.

Amazon Studios is launching “The Lord of the Rings: The Rings of Power,” an ambitious, years-in-the-making and very expensive salvo that will go head-to-head with another costly streaming fantasy epic: HBO’s “Game of Thrones” spinoff “House of the Dragon,” which recently became the most-watched series premiere in HBO history.

The series is based on J.R.R. Tolkien’s writings and asides about Middle-earth’s Second Age, which preceded the Third Age’s “Lord of the Rings” and “Hobbit” films and books. Tolkien’s grandson, Simon Tolkien, was a creative consultant.

“We say Tolkien sort of left a series of stars in the sky. Our job was to connect the dots and form the constellation and then sort of draw in between the constellations to give a little more specificity to it,” said J.D. Payne, a showrunner and executive producer.

Amazon Prime Video will debut both the first two “The Rings of Power” episodes on Friday. After that, the remaining six episodes arrive weekly on Friday.

The hour-long episodes are stuffed with action and humor but buckle up: Payne and his co-showrunner Patrick McKay plan to use a 50-hour canvas to explore their nuanced characters and complex histories. These first eight episodes are like an appetizer.

Early ones shift across the various regions of Middle-earth, our planet’s imagined mythological past. Here, some 4,000 years before “The Hobbit,” are elves involved with royal intrigue, dwarves who mine inside mountains, hobbitlike harfoots who are pastoral, humans who seem unusually prone to violence, and evil orcs.

Despite being set centuries before the books and films that make up the Tolkien’s canon, fans of “The Lord of the Rings” will notice some familiar characters, based on the long lifespan of some of the creatures, including Galadriel, Elrond and Isildur. Sauron, the evil force, is unseen in the first two episodes but a malevolent presence throughout.

Morfydd Clark grew up in Wales to parents who adored Tolkien’s epic book series and her dad read her “The Hobbit” when she was 9. The films came out when she was 11, accelerating the obsession. Now she finds herself playing a young Galadriel, a powerful elf played later in the films by Cate Blanchett.

“I think there’s a lot of hope in Tolkien’s world, and with hope comes bravery to stand up and have courage for what you think is valuable,” she said. “The world needs to be safe enough for the smallest and most vulnerable. And I think that’s something that’s important to remind yourself — just because something suits you, it doesn’t suit everybody.”

That sense of hope is something that distinguishes the series from “House of the Dragon,” which revels in a cynical, bloody view of mankind. McKay notes that Tolkien emerged from World War I with a complex fairy story, unlike many of his literary peers who were writing about wastelands and darkness.

“Middle-earth is a fundamentally optimistic and hopeful place. He was writing about positive values and friendship and brotherhood and underdogs,” McKay said. “He was telling you that in the darkest, deep of Mordor — in his wasteland — friendship could win the day and good could triumph over evil.”

The show’s tone shifts depending on which place is being visited. Harfoots, who have Irish accents, are whimsical, communal and clever, while dwarves have Scottish accents, are fond of a drink and are a little rough. Elves are elegant and elite, with upper English class accents and a fondness for billowing cloaks and long, elaborate ceremonies.

The cast — a massive ensemble of 22 actors — is multiethnic and composed of actors of different ages and fame, from Tony-nominated Benjamin Walker to up-and-coming Charlie Vickers, who graduated from drama school in 2017.

“It’s a very heterogenous world and if it wasn’t, we’d be dealing with dystopia,” said Trystan Gravelle, who plays a royal advisor in an Atlantis-like kingdom. “I think it’s very fitting as well in 2022 that we reflect that as well. And I think it enriches everything. The world’s a richer place for it.”

The cast filmed in New Zealand during the pandemic and were away from loved ones for almost two years. The actors rarely visited the sets of rival fictional races, but all gathered for potluck lunches and holidays, often at Walker’s house where a mean fried chicken was served. “I got a bunch of babysitters out of it,” he joked.

“What that did is it sort of forced us to to lean on each other and that is a bonding experience like no other,” said Nazanin Boniadi, who plays a human healer and single mother. “That fellowship that you see on screen was forged very much behind the scenes.”

The production — rated TV-14 for violence versus the “Game of Thrones” prequel which is TV-MA for violence, language, and nudity — is one of the most expensive in history, with Amazon spending at least $465 million on the first season in New Zealand, where the series employed 1,200 people directly and another 700 indirectly. In total, the season has reportedly cost $1 billion.

Choir music swells during breathtaking panoramas and the dialogue is thunderous and portentous. “There can be no friendship between hammer and rock. One will surely break,” one dwarf leader says. In another scene, an elf counsels another who is confused: “Sometimes we cannot know unless we touch the darkness.”

The new series debuts in the long shadow left by Peter Jackson, whose film trilogy adaptation of Tolkien’s books won critical and commercial praise in the early 2000s and claimed the best picture Oscar for “Return of the King.” For the series, there was more freedom to create as long as it was true to the author.

“We really tried to just go back to Tolkien. That was our mantra from the beginning: ‘Just go back to the books, go back to the books, go back to the books,’” said Payne. “We always have Tolkien at the base of what we’re doing.”

The new series has lots of big themes to chew on, including overcoming racial differences, environmentalism, the power of friendship, women’s strength and how even the smallest person can change the world.

“A show like this that has definitely dark themes — darkness within oneself, the fight to do what’s right, battling great forces greater than you — but it also just has themes of friendship and loyalty and love and hope,” said Sara Zwangobani, who plays the new character Marigold Brandyfoot.

The series will have to thread a careful needle by enchanting hard-core fans of Tolkien who will be searching for connections to the universe, attracting those who have hazy memories of the books and don’t want to be burdened with tons of new material, and young people whose perhaps last epic adventure series was “Harry Potter.”

“It’s kind of the gateway for new fans in that it’s kind of the first chapter, the adolescence of Middle-earth, where the films you could imagine are the adulthood of Middle-earth,” said Walker. “So we’re seeing all these characters we know and love — and some that we’re being introduced to — take the first steps on their journey in becoming their destined selves.”

___

Mark Kennedy is at http://twitter.com/KennedyTwits

___

For more AP entertainment news: https://apnews.com/hub/entertainment