Dreamworks Animation’s best franchise comes to a close with what may be its best installment.

Dreamworks Animation is a weird animal in terms of quality, sitting somewhere between the polar opposites of Pixar and Illumination but always swinging just hard enough that they never quite settle into dull mediocrity. You can pretty clearly delineate the quality of the animation studio’s output in terms of franchises that stay fairly consistent from film to film, and the best of these is the run spawned from How to Train Your Dragon, a kid-friendly fantasy narrative with some surprisingly mature ruminations on friendship and overcoming prejudices. It’s hard to pin down any one thing that makes this franchise work so well, besides some instantly iconic dragon designs that make the series infinitely marketable, but the closest these films come to transcendence is expressed most potently in the new final installment, How to Train Your Dragon: The Hidden World.

Picking up one year after the events of the previous film, The Hidden World finds Hiccup (Jay Baruchel), the young new chief of the Viking village Berk, and his dragon companion, the Night Fury Toothless, struggling to find space for dragons among their number as they rescue more and more from the grips of competing warlords who would use the dragons as soldiers in an army. These warlords enlist the help of Grimmel (F. Murray Abraham), a dragon hunter best known for causing the near-extinction of the Night Furies, to capture Toothless so that the other dragons of Berk will follow their leader. Grimmel releases a female Night Fury – called a Light Fury because it’s white – to draw Toothless into the open to court the last of his species, and threatens Berk with a show of force that forces Hiccup to consider moving his people away from their homeland. Hiccup's ideal home: the mythical Hidden World, where dragons are thought to come from and where the peace-loving people of Berk could live away from their warring neighbors.

The reasons The Hidden World works can largely be chalked up to a lot of what made the previous films in the franchise similarly succeed. The humor walks a fine line between family-friendliness and genuine wit and charm, and the hijinks from the intelligent pet-like dragons never get old. The action set-pieces are kinetic and fun with stakes that feel heavy and real. The ever-growing cast of dragon riders is all memorable and endearing, including the likes of America Ferrera, Cate Blanchett, Jonah Hill, Craig Ferguson, and Kristen Wiig in instantly memorable roles. (Justin Rupple takes over for TJ Miller as the voice of Tuffnut, and honestly, the character has never been funnier.) The series remains a gold standard in terms of casual representation of disability, with both Hiccup and Toothless sporting prosthetic limbs that inform their characters without being portrayed as pitiable weakness. Simply put, if you like the first two How to Train Your Dragon films, you’re going to like this one for a lot of the same reasons, though you’ll absolutely notice a gorgeous upgrade in the animation quality over the nine years since the first film.

What makes The Hidden World stand out from its predecessors, though, is how wholeheartedly it commits to giving these characters and this franchise a proper send-off. Where the previous films are largely about overcoming prejudice and finding peace in a world that constantly seeks to take that peace in the name of power, The Hidden World is an intensely personal story of codependence and loss, forcing its young audience to confront the question of which is more important: what is more convenient for our friendships or what is best for our friends. This culminates in one of the most well-earned emotional climaxes I’ve seen from an animated franchise in a long time, giving Hiccup and Toothless the denouement they deserve while allowing the audience to sit with the implications of their unlikely friendship and how it transformed their world.

If there’s one fault in How to Train Your Dragon: The Hidden World, it’s one that should be familiar to franchise fans: Grimmel is not a terribly interesting villain. There’s nothing really wrong with him, just as there wasn’t anything really wrong with the first film’s alpha dragon or the second’s Drago Bloodfist, but he’s also more an instigator of conflict than a thematic complement to Hiccup, Toothless, or the other dragon riders, at least not any more so or more uniquely than those previous antagonists.

Even so, How to Train Your Dragon: The Hidden World is a beautifully animated, emotionally devastating capper to Dreamworks Animation’s best franchise. I’m sad to see it go, but I’m more than happy to see it go out on its convictions and with a love for the characters it made us care about along the way.