If giving The Joker a sympathetic backstory was tough, that’s nothing to what Disney has been doing for the past five years with Maleficent, the satanic sorceress who put Sleeping Beauty under.

First in “Maleficent” (2014) and now in a daring and sometimes dark sequel, “Maleficent: Mistress of Evil,” the dragon lady with the black horns dances on the line between the light and the dark — and, thanks to star Angelina Jolie, makes each step captivating.

As fans of the first movie might recall, Maleficent not only put a curse on the princess Aurora (Elle Fanning), but took a secret role in raising her. This allowed Aurora, after being awakened by the charming Prince Philip, to forgive Maleficent her sins and also to inherit the title of Queen of the Moors, in charge of all the fairy folk outside the kingdom of Ulsted.

As this new story begins, Aurora is trying to handle the responsibilities of being queen, and to broker peace. The prince of Ulsted, Philip (now played by Harris Dickinson), offers a quick solution: He proposes to her, very romantically. But being engaged brings its own problems, starting with breaking the news to Maleficent — who’s not thrilled — and arranging for their future in-laws to meet.

Thus begins the conflict for the entire movie, as Maleficent tries to keep her rage against humans in check — but finds the needling from Philip’s mother, Queen Ingrith (Michelle Pfeiffer), more than she can stand. Both sides soon are at odds, King John (Robert Lindsey) succumbs to a familiar curse, and Aurora doesn’t know if she should trust her godmother or her new human relations.

While Ingrith prepares for war, stoking fear and xenophobia against the folk across the river (how do writers think of these things?), Maleficent makes a life-changing discovery: She’s not the only Dark Fae left in the world.

Director Joachim Rønning (“Pirates of the Caribbean: Dead Men Tell No Tales”) and the scriptwriters — Linda Woolverton, who wrote the first “Maleficent,” Micah Fitzerman-Blue and Noah Harpster (who collaborated on the upcoming Mr. Rogers biopic “A Beautiful Day in the Neighborhood”) — present a gripping, action-packed story focused on three powerful female characters. There’s plenty of business for familiar faces, like Aurora’s fairy aunties (Lesley Manville, Imelda Staunton and Juno Temple), and room for some fascinating new ones, in particular a Dark Fae played by Chiwetel Ejiofor (“12 Years a Slave”).

Jolie, in her usual regal way, owns the screen, but she has to fight for it. Fanning has grown into a formidable young actor, which allows her Aurora to stand up to Maleficent’s fury and channel the princess’ innate goodness. And Jolie finds a worthy sparring partner in Pfeiffer, who delights in her character’s Machiavellian menace.

(Photo courtesy of Disney) Harris Dickinson as Prince Philip, left, Elle Fanning as Princess Aurora, Robert Lindsey as King John, and Michelle Pfeiffer as Queen Ingrith, in Disney's fairy-tale sequel "Maleficent: Mistress of Evil."

“Maleficent: Mistress of Evil” has moments that skirt the edge of Disney-themed action, with scenes of violence against the fairy folk that are surprisingly intense. But for older kids, and grown-ups who like their fantasy on a grand scale, this sometimes grim fairy tale is a deliciously dark ride.

★★★1/2
‘Maleficent: Mistress of Evil’
Angelina Jolie is back as Disney’s misunderstood villain, going head to head with Michelle Pfeiffer’s scheming queen in a thrilling action fantasy.
Where • Theaters everywhere
When • Opens Friday, Oct. 18
Rated • PG for intense sequences of fantasy action/violence and brief scary images.
Running time • 118 minutes