Writer/director Dean DeBlois skillfully brings the beloved and much-lauded “How to Train Your Dragon” franchise in for a landing with the third film in the series, “The Hidden World.”

Audiences fell in love with the relationship between Viking boy Hiccup (Jay Baruchel) and his trusty dragon steed Toothless in 2010’s “How to Train Your Dragon” and 2014’s “How to Train Your Dragon 2,” based on the books by Cressida Crowell. With “The Hidden World,” DeBlois (who also wrote and directed the first two movies) brings the story to a close — or at least to a stopping place — in a film that is as emotionally moving as it is beautifully made.

At the center again are Hiccup and Toothless, whose unlikely friendship between man and dragon has become an unbreakable bond. Hiccup is now the Viking chief of his homeland, Berk, and has created a utopia where humans and dragons live in harmony.

But their penchant for raiding dragon-poaching trading ships to rescue new friends draws the attention of many nefarious types, including, most dangerously, dragon hunter Grimmel (F. Murray Abraham), who has his sights set on the last Night Fury dragon, Toothless. Protecting his brood, Hiccup sets off in search of the Hidden World his father once spoke of, where dragons live in peace.

It’s a rather simple story, but it’s imbued with not only the audience’s affection for Hiccup and Toothless, but the emotion that arises when Hiccup realizes that change is necessary and that friendships evolve as individuals grow. Having become the new chief, Hiccup has to take on a leadership role and possibly marry his intended, Astrid (America Ferrera). Toothless has his own journey to follow, especially when his love interest arrives, a sleek white dragon they dub the Light Fury.

The movie strikes a tricky tonal balance between the epic and the silly. The animation is stunning, with nearly photorealistic waves crashing and breathtaking landscape shots. There is a painterly treatment to light and shadow, with watercolor sunsets and fire shining through mist.

But it’s also pure fantasy, and some elements of the character design — especially of the Light Fury — recall 1970s-style animation, such as “The Last Unicorn.” The film feels timeless, especially with the epic score by John Powell (also returning from the first two movies) soaring beneath the action.

The one aspect that places “The Hidden World” squarely in its time is the juvenile banter of Hiccup and Astrid’s Viking crew, who sling-slang around with a surfer-brah delivery, quarreling and quibbling over the trivial matters.

The characters offer some background color and humor, but their stories aren’t developed, and any subplots are tissue-thin at best. What’s most important to the story are Hiccup and Toothless — anything else is a distraction. Toothless and the Light Fury are magnetically captivating to watch in their fluid movements and amusing wordless communications, and they speak volumes more than the overly chatty Viking pals.

Through all of the raids and kidnappings and hoopla, “The Hidden World” brings it home with an enormously moving message about the healing power of friendship and learning to stand — and fly — on your own. The finale to the franchise will fly away with your heart.