Moviegoers unwise enough to take in a showing of “Logan” (Fox), the 10th installment of the Marvel Comics-based X-Men series, will discover that the very first word of the dialogue is a four-letter one beginning with “F” and the last image of the film is sacrilegious.

In between, the grumpy mutant of the title (Hugh Jackman) — a character better known as Wolverine — uses his machete-like claws to perforate all who threaten him.

His main adversary is Donald Pierce (Boyd Holbrook). Pierce is an agent of Transigen, a company that has set itself the goal of eliminating all mutants not under their control.

That includes Logan’s current housemates, Professor Charles Xavier (Patrick Stewart) and the albino Caliban (Stephen Merchant), as well as Laura (Dafne Keen), a young girl with blades like his own who, as the plot progresses, comes under Logan’s reluctant protection.

Set in the near future, director James Mangold’s action adventure poses as a redemption story for its bad-tempered protagonist. Logan gradually has his disgust with the world softened by Laura’s presence. He also improves his strained relationship with Charles.

But in the midst of all that, he carries on a spree of beheadings, impalements and limb lopping as he vents his anger — and his enemies. Worse yet, Laura behaves in a similarly vicious manner, balletically jumping form one extra’s back to the next one’s shoulders as she, so to speak, digs in.

As though this duo wasn’t enough, Transigen has been developing another blade wielder who, once unleashed, starts to get under Logan’s skin.

The upshot is a dreary killing fest that’s gutsy in all the wrong ways.

The film contains excessive gory violence, upper female nudity, about a half-dozen uses of profanity and pervasive rough and crude language. The Catholic News Service classification is O — morally offensive. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian.