In its finest moments, “King Arthur: Legend of the Sword” is swift and clever and exhilarating.

At its low points, “King Arthur: Legend of the Sword” plays like a cheesy B-movie, with ridiculous monsters and unintentionally laugh-inducing moments.

Add the four-star rating for some scenes to the one-star rating for other scenes, divide by two and presto! Here’s your three-star review.

(And they told me when I entered the movie reviewing game there wouldn’t be any math. Harumph.)

Director Guy Ritchie, he of the signature quick cuts and dazzle-edits and dark humor (“Snatch,” “Lock, Stock and Two Smoking Barrels,” “Sherlock Holmes”) gives a unique spin to the umpteenth telling of the King Arthur legend. This is essentially a superhero origins story, with our man Art (Charlie Hunnam) growing up as a hardscrabble nobody who is tapped for greatness, resists the calling for as long as possible and then finally accepts his destiny.

While caked in mud and blood and sometimes moving in slow motion, natch.

In an extended prologue, the wise and noble and just King Uther (Eric Bana) rules England with a strong but benevolent hand. Uther’s brother Vortigern (Jude Law), consumed with envy and obsessed with power, orchestrates a violent coup, spilling the blood of myriad family members.

Uther’s toddler son Arthur is placed on a boat just in time to escape the wrath of Vortigern. The boat miraculously makes it all the way to the shores of the bustling urban center known as Londinium. Arthur is rescued by a group of prostitutes who raise him in their brothel.

A couple of decades later, Arthur practically runs the streets of Londinium. He exacts justice on those who deserve it, he builds up considerable coffers — and he’s become such a physical force that even visiting marauding Vikings bend to his will.

Meanwhile, back at the palace, the evil Vortigern grows ever more powerful, thanks in great part to a devil’s bargain he has struck up with a very creepy and very slimy sewer-dwelling beast that’s a disturbing combination of octopus and three human-like beasts. (This is one of those B-movie sequences previously referenced.) As Voritgern puts it, he doesn’t care if the people hate him — as long as they fear him as well. He’s stark-raving-mad drunk with power.

It takes a while — in fact a little too long — for the moment when Arthur puts his hands on the sword in the stone, gives it a mighty yank, and becomes an instant, albeit very reluctant, legend, and the last best hope for the people to rise up against the ruthless Vortigern.

Director Ritchie paces much of the second act like a heist movie, with some fantastic, fast-paced montages of Arthur and his team plotting and carrying out uprisings against King Vortigern. (Terrific work by all playing Arthur’s comrades in arms, including Djimon Hounsou as Bedivere; Aidan Gillen as Bill; Kingsley Ben-Adir as Wet Stick; and Astrid Berges-Frisbey as the Mage, a mysterious sorceress with an impressive array of magical powers.)

Jude Law, dressed like Mick Jagger circa 1972, is all sneers and primal howls as Vortigern. It’s an up-and-down performance from a fine actor. For all of Vortigern’s heinous deeds — and they’re about as heinous as heinous can get — he seems overmatched against Arthur from the get-go.

Charlie Hunnam continues his movie-star ascent with a strong performance as the conflicted Arthur, who will risk all to save his friends and family, but refuses to accept his path as the people’s king until there’s absolutely no way he CAN’T acknowledge his destiny.

Director Ritchie and the set design and CGI teams create some spectacular tableaus, from beautiful countryside long shots to some intricately choreographed battle sequences at the king’s castle and in the labyrinthine streets of Londinium.

In fact “King Arthur” works best when the focus is on the bonds forged between Arthur and his future knights, the battles between the rebel forces and the obligatory faceless henchmen, and even the slightly sexual tension between Arthur and the rather humorless but enticing Mage. The stuff with the Octo-Person Creature and gigantic reptiles and a CGI swordsman that talks like Darth Vader? Eh.I’ll take the exploits of the mythical man over the booming magic show every time.

★★★

Warner Bros. presents a film directed by Guy Ritchie and written by Ritchie, Joby Harold and Lionel Wigram. Rated PG-13 (for sequences of violence and action, some suggestive content and brief strong language). Running time: 126 minutes. Opens Friday at local theaters.