Sandy Cohen, Associated Press

Director Bryan Singer invigorates his latest X-Men film with vintage 1980s charm in an origin story about how the mutant supergroup unites and divides in response to the villain Apocalypse. And though battles between heroes are an X-Men tradition, warring among the ranks has become a superhero trope this season, at play in both “Batman v Superman: Dawn of Justice” and “Captain America: Civil War.”

Like similarly dressed beauties in celebrity magazines, it becomes a case of who wore it better, and that’s an unfair burden on what is ultimately a satisfying conclusion to the rebooted trilogy. Even with an ensemble that includes Jennifer Lawrence and Michael Fassbender and Poe from “Star Wars” (Oscar Isaac, unrecognizable as Apocalypse), the film doesn’t match the magic of the latest Avengers movie, whose multiple characters were carefully developed over a dozen films.

“X-Men: Apocalypse” is also a prequel, so the fate of its characters isn’t a mystery: We already know who survives.

That’s not to say “Apocalypse” isn’t a fun flick on its own. It has a grand scope, great special effects and doesn’t require knowledge of its predecessors to be enjoyed. Those who know the characters get even more payoff.

As hinted at during the credits for 2014’s “X-Men: Days of Future Past,” this film brings on Apocalypse, a super-powered mutant who can transfer his essence from one being to another and was revered as a god when he existed millennia ago. Resurrected in 1983 after centuries of lying dormant, Apocalypse is disgusted at the state of the world. He wants to wipe out greedy, intolerant humans and restore the mutants to their deified status. He magnifies the power of any mutant who sides with him.

Meanwhile, Professor X (James McAvoy) has renewed his focus on his School for Gifted Children, where Scott Summers/Cyclops (Tye Sheridan) and Jean Grey (Sophie Turner) are among the students learning to control their powers. The professor’s friend and rival, Erik Lehnsherr/Magneto (Fassbender), put his mutant powers aside to live as a family man in Poland. But when personal tragedy strikes, he goes on a destructive streak.

Magneto and other disillusioned mutants — Storm (Alexandra Shipp), Angel (Ben Hardy) and Psylocke (Olivia Munn in a very tiny outfit) — join forces with Apocalypse. Professor X and his protégés, including Raven/Mystique (Lawrence) and fellow blue person Kurt Wagner/Nightcrawler (Kodi Smit-McPhee), unite to try to stop them.

A muscular, mutton-chopped X-Man — here referred to as Weapon X — isn’t part of the fight, but thrills in a brief, shirtless cameo.

McAvoy is all charm as Professor X. Fassbender brings gravitas to Magneto. Lawrence, though, acts as though she might be over this kind of big franchise fare.

The standouts, in both character and performance, are Jean Gray and Peter Maximoff/Quicksilver (Evan Peters). Jean seems even more confident and powerful here than when Famke Janssen plays her in the previous “X-Men” films, and she gets to utter the movie’s best self-referential barb. In talking about trilogies, she says, “At least we can all agree the third one’s always the worst.” Peters shines as Quicksilver, a dorky-cool, ultra-’80s Marty McFly who provides both playful comedy and zippy action sequences.

Simon Kinberg’s screenplay is guilty of a few lame lines at key moments (“He thought that you were going to make a difference in this world, maybe even change it”), but otherwise keeps the story’s movement brisk and backstories clear, though the cast is big and includes several new faces.

The X-Men had a lot to accomplish in this film before Captain America and his crew swooped in with their own movie three weeks ago. Even if the Avengers wore it better, the X-Men are doing just fine.

‘X-Men: Apocalypse’

Three stars

out of four stars

Rated PG-13; violence, action, destruction, language, suggestive images

2 hours, 27 minutes

Opens Friday; screenings Thursday in some theaters