Grogu and Din Djarin (voiced by Pedro Pascal) in "The Mandalorian."

Editor’s Note: The following contains spoilers about the seventh episode of “The Mandalorian,” Season 3, “The Return.”

CNN  — 

To borrow a line from another Disney+ series, it’s been the Empire all along.

After a somewhat disjointed third season, “The Mandalorian” took a big step toward crystallizing its next phase in the last two episodes, which officially brought back the villainous Moff Gideon (Giancarlo Esposito) and made clear that much of the evil unfolding across the galaxy was the work of former Imperial operatives, plotting behind the scenes to undermine the hapless New Republic.

In the process, the show has moved to putty in some gaps left by the most recent movie trilogy, including the rise of the First Order and the return of Emperor Palpatine, what with all the talk of a cloning operation that received a somewhat abbreviated discussion in the race to wrap things up with “Star Wars: The Rise of Skywalker.”

The finale, “The Return,” used that foundation to mount an epic battle, pitting the Imperial forces – newly outfitted for the cause – against the reunited soldiers of Mandalore, a warrior culture whose ethos was nicely embodied by the sequence in the penultimate chapter in which one nobly sacrificed himself in order to facilitate the escape of his brethren. It was the kind of cinematic sequence that would surely play well in the planned movie that will capitalize upon this timeline of the “Star Wars” universe.

The episode also featured Bo-Katan Kryze (Katee Sackhoff), the Mandalorian leader, cementing her claim to that title as she faced off against Moff Gideon, eventually with a little help from her friends, Din Djarin (voiced by Pedro Pascal) and Grogu. At the end of that fight, the latter again displayed the vast potential of his Jedi powers in saving them from a fiery death.

Throw in muscular moments like that, and simpler pleasures like Grogu using his robot shell, and even when it’s a little clunky the series can still be a great deal of fun.

Indeed, executive producers Jon Favreau and Dave Filoni have turned “The Mandalorian” into a key linchpin in Lucasfilm’s larger plans, advancing a broader picture than just the travels of Din Djarin and Grogu.

That said, after resolving the fate of Mandalore, the finale essentially hit the reset button on the show’s central premise in the form of happy ending. That involved formalizing the central duo’s bond by having the Mandalorian adopt Grogu, before assuming a new bounty-hunting role focused on pursuing Imperial remnants across the galaxy.

Notably, the seventh episode included a reference to Thrawn, the villain from the animated “Star Wars Rebels” who will be featured in the upcoming live-action series “Ahsoka” – further evidence, if any was needed, that “The Mandalorian” fully embraced the well-worn Disney practice of adapting its animated properties into live-action formats.

Overall, to say the third season wasn’t always neat or pretty would be an understatement. Some of the frustration expressed about its arc was understandable.

Still, if you’re blessed with a show that has the latitude to indulge in odd detours while advancing a larger objective – serving as the jumping-off point to explore what has become a fertile quadrant of “Star Wars” mythology – for now, this is the way, warts and all.