War for the Planet of the Apes, arriving in theaters on July 14, is the final installment of one of the rarest things in Hollywood: a major film trilogy where each successive film was better than the last.

Rise of the Planet of the Apes, released in 2011, was a pleasant surprise, with its story about humanity inadvertently inventing its successor (a species of intelligent apes). Dawn of the Planet of the Apes (2014) deepened and intensified that first film’s themes within a post-apocalyptic setting, where the chance of humans and intelligent apes finding a kind of peaceful rapprochement seemed possible but was ultimately lost, due to both groups’ inherent prejudices.

The new movie is better than both of its predecessors, a muscular, surprisingly quiet film about how the end of some things is the beginning of others. It boasts terrific, tense action sequences, but also a real, poetic sense of longing for a world long gone. It’s one of my favorite films of the year so far, and it deepens a little bit every time I think about it, which is always a good sign of its staying power.

But watching it put me in mind of another film trilogy — the first three Bourne films. (Technically, there are five Bourne films total, but the opening trio stands alone so well and overlaps with the Apes films so well that I’m going to focus on them.) In similar fashion to the Apes films, 2002’s The Bourne Identity was a surprising action series opener, with 2004’s The Bourne Supremacy exploring its themes in unexpected ways, and 2007’s Bourne Ultimatum capping the series in terrific fashion (and winning a few Oscars along the way).

And that comparison point naturally suggests the question: How can the Bourne and Apes movies get franchise filmmaking so right that they transcend the crass commercialism of even some of our best blockbusters, to become something more artistic and challenging, where so many other franchises flounder? The answer is twofold — one part technique, and one part (as with all the best movies) purely accidental.

The Apes movies have learned all the right lessons from our current obsession with serialized television

The endlessly revived (not to mention useless and boring) debate over whether movies or TV are better in the 2010s misses one important point. In the 2010s, movies and TV, more often than not, are converging.

Sure, the filmmaking on Game of Thrones has not yet reached the level of the best blockbusters, but it puts something like Suicide Squad to shame. And the biggest projects in both mediums tend toward increased levels of serialization. (On TV, that results in high-wire storytelling; in movies, it mostly results in lots of “cinematic universes” that die before they can live.) And the closer we get to a world where everybody watches everything in their living room anyway, the more likely it seems that we’ll eventually differentiate “film” from “television” based on the length of the story being told.

What the Apes films have in common with the Bourne films — and with the best television shows — is their understanding that each chapter of the saga must stand on its own, teasing only the briefest of glimpses at future films. (The first film ends with a virus that will all but eliminate humanity escaping into the wild; the second ends with the human military finally training its forces on the apes.)

In the case of the second and third Apes films, at least, this makes sense. Their director is Matt Reeves, one of the best blockbuster directors out there, in that he blends the classicism of ’40s and ’50s Hollywood filmmaking with the knowledge he amassed while working on TV very early in its golden age. (Among other things, he co-created the undervalued dramedy Felicity with fellow TV-to-movie hand J.J. Abrams.) Thus, he’s able to hark back to the roots of our blockbuster era, when directors like George Lucas, Steven Spielberg, and Robert Zemeckis turned their all-encompassing movie knowledge into a rush of forward momentum, rooted in Hollywood classicism, while blending those roots with our modern taste for big, serialized sagas.

But it’s that choice to make the story an epic one, in particular, that has elevated Apes. The three films almost exclusively focus on one character — the ape leader Caesar — and even though other characters move through the three-film story with him, they’re all apes.

Fittingly, the films completely switch major human casts with each new chapter, going from the friendly, loving affection of James Franco and John Lithgow (who raise baby Caesar) in the first film to the cautious optimism of Jason Clarke and Keri Russell (who try to broker peace with him) in the second to the almost completely amoral Woody Harrelson (who wants to exterminate Caesar) in the third film. The main constant is Caesar, who moves from child to revolutionary to leader, then has to deal with the burden of power.

This is perhaps why these new Apes films have escaped the trap so many other franchises have fallen into — failing to provide a reason to exist. The original five Planet of the Apes movies in the ’60s and ’70s eventually got around to making the apes their main characters, but only after a couple of movies where humans were tossed onto the titular planet to gawk at the funhouse mirror it threw up to human society. For this reason, Tim Burton’s mostly faithful 2001 remake of the original Planet of the Apes flopped critically. There was no center.

But the latest Apes films have thought long and hard about what would make this series distinctive, and have found it within the nascent ape society. Flipping the perspective didn’t just give the series a reason to exist; it allowed the free-floating politics that have always hovered around the edges of the Apes movies (where the apes are human-like, but not too human-like, which lets them symbolize essentially any oppressed group of people you want them to symbolize without directly calling your attention to it) to move closer to the core of the story.

And that’s where this Apes trilogy got a little bit lucky.

War for the Planet of the Apes is a talking-ape movie about evenly matched forces trying to destroy each other

Harrelson’s character in War is trying to build a massive wall to keep out invaders. He’s recruited what amounts to ape slave labor to do just that. The screenplay for this film was probably written long before the political rise of Donald Trump, but there’s no way the filmmakers didn’t note the similarities of their wall to Trump’s proposed wall at some point during War’s production last year.

It’s just the latest way in which the Apes franchise feels as if it’s accidentally landed in the social and cultural zeitgeist of the 2010s. The Bourne films — all about the lengths the intelligence community will go to to keep Americans “safe” — behaved similarly in the 2000s, but Paul Greengrass (who directed the latter two films in that first trilogy) openly invited the comparisons of Jason Bourne’s adventures to the Bush-era surveillance state. Reeves and the Apes folks haven’t done much of that with their films.

In some ways, they shouldn’t have to. The themes that War plays around with are elemental ones, and they’d be cheapened a little bit by trying to slap a Make America Great Again hat on them to make them more feel Relevant and Important.

Like so many works of “relevant” art to emerge early in the Trump era, War is a movie about Right Now that is also about Always. Taken in total, the three Apes films are movies about the chilling effects of prejudice and how hard it is to attain peace when any one member of your community could set off war. They’re about the hard-won struggle to attain forgiveness and the intersections of justice and mercy.

And they’re about big battles and pulse-pounding escapes from danger and all those other things moviegoers have always loved. (They’re also visual effects landmarks in that Caesar, played by Andy Serkis, is the unquestioned lead of the movies, even though the character is created entirely via motion capture.)

But it also doesn’t undercut the movies to suggest that watching the sometimes bleak but ultimately hopeful War made me feel like I better understood the world we live in right now, at least a little bit. The apes and the humans in these films each believe the other poses an existential threat to their very life, and neither side is wrong to think that, which means they may be fated to fight even both of them would ultimately rather not.

The Apes films succeed because everyone involved took an approach to franchise filmmaking that eschewed the current vogue for creating movies that feel like endless teases for other movies; the trilogy is smartly wedded to good, old-fashioned blockbuster knowhow. But it certainly doesn’t hurt that it arrived at a time when more and more people around the world believe we are on the precipice of something terrible, and that we’re in danger of being destroyed by the forces all around us.

That feeling doesn’t have to be a bad thing. It can, instead, be a warning to step back from the brink — or at the very least that the planet itself will outlive us all, human and ape alike. The ending of my story can carry within it the beginning of yours and vice versa. That can be scary or beautiful; it’s all in who’s narrating.

War for the Planet of the Apes opens July 14 in theaters everywhere. The first two films in this current trilogy are available on DVD and digital platforms. We’ll post a full review of the third film closer to its opening.