Ever since Disney made the epic purchase of Lucasfilm and the attendant rights to all things “Star Wars” in 2012, the Mouse House has been revving up new films tied to the legendary series. Fans worried that the new films would botch its legacy, but there’s nothing Disney could do that would be worse than what series creator George Lucas did himself with the three prequels in the early 2000s.

But judging by the box office returns, fans have been quite pleased with the official seventh and eighth chapters in the main series and the first spinoff film, “Rogue One.” The biggest test yet, however, comes with this weekend’s new release “Solo,” which dares to cast unknown actor Alden Ehrenreich in the iconic role of maverick space pilot Han Solo after Harrison Ford rode to fame in the same role 41 years ago.

The good news is that the gambit has paid off, with Ehrenreich not only bringing the right dose of humorous swagger to the role, but also some affecting pathos as the film hinges largely on his complicated pre-Leia romance with a woman named Qi’ra (Emilia Clarke). A great deal of the fun comes from the filmmakers creating origin-story moments for Solo that explain how he got his name (he wasn’t born with it), how he met Chewbacca and Lando Calrissian (Donald Glover) and how he scored ownership of the Millennium Falcon.

The story itself hinges on Solo wanting to escape his poverty-stricken planet with Qi’ra in his late teens and embark on an adventure-filled life as a pilot with her. But the young rogue immediately runs afoul of some nasty aliens he upset in a business deal, and he and Qi’ra get tragically separated as they attempt to escape — he manages to flee, while she is captured.

Jump to three years later and Solo is trapped in a war as an infantryman despite having joined the Empire military as a pilot. After running afoul of his superiors, he meets Chewbacca in a surprisingly dangerous way and the two jump aboard a spaceship commandeered by another rogue smuggler named Beckett (Woody Harrelson at his charming best).

Beckett enlists Solo and Chewie in a mission to steal tons of a highly coveted, rare and extremely explosive fuel source. The huge payoff if they succeed will be enough to set Solo up with the spaceship of his dreams, enabling him to go back to his home planet and rescue Qi’ra.

But then he runs into Qi’ra unexpectedly while Beckett takes him to meet Dryden Vos (Paul Bettany), the evil and very wealthy man who’s overseeing the heist. Finding that she has become Dryden’s right-hand woman, Solo has to figure out whether he can trust her while also figuring out if Beckett and Calrissian — whom Qi’ra introduces to him in a high-stakes card game — are really on his side.

The best thing about “Solo” is its tight script by Lawrence Kasdan (who also wrote “The Empire Strikes Back” “Return of the Jedi” and “The Force Awakens”) and his son Jonathan, filled with interesting twists and double-crosses all the way to the end. As mentioned, the sense of discovery about characters we thought we knew inside-out is a lot of fun, and director Ron Howard — who stepped in to replace another directing team and had to reshoot 80 percent of the movie — brings it all to life expertly.

One could look at the seemingly endless series of “Stars Wars”-related films coming down the pike (at a clip of every six months to a year now) and wonder if they’ll run out of steam. But four movies in, Disney is showing it has a commitment to using top-notch writers and directors, leaving viewers  plenty of reasons to be thankful that they’ll have quality filmmaking to go with stunning effects for years to come.