Patrick McGrath’s 1990 novel “Spider” was a brilliant portrayal of the mental unraveling of a man recently released from a long institutional stay as he brooded over his real and imagined past. David Cronenberg’s screen adaptation, though equally extraordinary, is very different. While McGrath’s book drew the character from the inside out, as it were–delineating Dennis Cleg’s disintegration through the first-person narration of its deeply troubled but articulate protagonist–the film makes the material cinematic by dramatizing the process from the outside in. We’re not told about Spider’s experiences, memories and hallucinations, nor are we merely shown them; instead, as a result of Ralph Fiennes’ remarkable turn in the title role and the simple but elegant directorial devices Cronenberg employs, we’re invited virtually to live the process of rediscovery along with him. This puts certain demands on the viewer: you have to acclimate yourself to the picture’s deliberate, portentous tone and arrange the fragmented narrative elements into a coherent whole (just as a pane of glass is laboriously reassembled at one point in the story), always keeping a sharp eye to distinguish between reality and illusion. You also have to be prepared for a denouement that doesn’t offer the salve of ultimate triumph. (This picture refuses to make things easy on its audience the way “A Beautiful Mind,” another recent effort dealing with schizophrenia, did.) But “Spider” is, after all, a David Cronenberg film; it’s purpose isn’t simply to entertain and certainly not to be phonily uplifting, but to challenge us with an artistic vision of the darker regions of the human psyche. And it concludes, as the director’s masterpiece “Dead Ringers” (1988) did, not with a spiritual bang but the whimper of loss and desolation. That’s not what will satisfy most multiplex patrons, of course, but it’s a perspective carried through with such uncompromising rigor, technical precision and dramatic acuity that “Spider” takes a place near the very top of the Cronenberg canon–which, given the quality of his past films, is saying a great deal.

Fiennes gives a tightly controlled, carefully observed performance as Cleg, who arrives in London looking displaced and terrified, constantly muttering to himself and scribbling symbols only he can comprehend into a notebook he takes care to conceal from what he presumes are prying eyes. He makes his way to a half-way house presided over by the rigorous Mrs. Wilkinson (Lynn Redgrave), who is soon transformed in his paranoid fantasies into a woman, or rather women, from his sometimes-delusional past. (All are played, in whole or part, by Miranda Richardson in an astonishing display of versatility.) As he wanders the oddly desolate environs of what was his East End neighborhood as a boy, Cleg attempts to reconstruct his history, effectively watching, as a ghostly observer, his tormented younger self (Bradley Hill) descend into the hallucinations that will doom him. He recalls an idyllic relationship with his mother (Richardson), a sweet, proper woman who called him Spider and protected him while trying patiently to please his gruff father Bill (Gabriel Byrne). But Bill, a plumber who escaped his unhappy home life by nightly visits to the local pub, was–or so Spider believes–seduced by a local prostitute, Yvonne (played at first by Alison Egan but shortly by Richardson as well), and together the two murdered his mother after she’d discovered their affair, burying her in the vegetable garden of his father’s nearby allotment. Yvonne thereupon moved into their home as Mrs. Cleg–a circumstance that the boy obviously could not tolerate. The grown Spider’s obsessive fear of a gasworks that looms over the Wilkinson house is a clue to how he sought, emulating the techniques of the insect with which he identified, to deal with the woman he perceived as a hideous interloper in his family. Of course, though some of what the troubled man recollects has some basis in fact, a good deal of his memory is distorted, and much of it is simply mad invention. The viewer is called upon to disentangle the different strands of fact and fiction in the intricate web Spider weaves as he makes his rounds and tries desperately to remember and record his own story.

Like his protagonist, Cronenberg constructs a complex structure. His “Spider” is moody, soft-grained, fragmented, elliptical and flawlessly sustained; while structurally dense and very deliberately paced, it’s also surprisingly delicate, almost gossamer–like the web-images that he inserts into the piece without becoming overly insistent or obvious about it. This is the work of a great filmmaker working at the top of his form, effortlessly evincing a technical mastery that quietly throws the sort of directorial ostentation so common today into the shade. The film’s lack of the technical effects people have come to expect of the director of “The Fly,” “Naked Lunch” and “eXistenZ,” moreover, shouldn’t obscure the fact that it shares the themes that have long dominated his work: in this case the evil that arises from inside man is purely mental, not needing embodiment in some sort of physical apparition–it’s all done with atmosphere and precise character shading, as was the case in “Ringers.”

Cronenberg’s achievement wouldn’t be possible, of course, without the amazing performances of Fiennes and Richardson–the one a triumph of small, halting gestures and the other of broader strokes–as well Byrne’s subtle, nuanced turn as the father Spider views in quite a different light from the reality of his character. Hall contributes a sensitive portrait of the young Cleg, while Redgrave and John Neville make the most of their turns as Mrs. Wilkinson and a sad old resident of her house. Technically the picture is equally remarkable. The exquisite production design (Andrew Sanders) and art direction (Arvinder Grewal), emphasizing varying shades of brown and grey, create a gloomy, depopulated cityscape that seems eerie and menacing even when it’s brightly lit; and the cinematography by Peter Suschitzky captures it brilliantly, The visuals are complemented perfectly by the spare, atmospheric score from Cronenberg’s usual collaborator Howard Shore.

“Spider” is hardly a crowd-pleaser, and to work its magic it demands both a viewer’s attention and his active participation, as “Memento” did (though in a flashier, more obvious way). It’s also a film that benefits from repeated viewings, which many will be unwilling to give it. Those who surrender themselves to its challenging approach and dark vision, however, will be richly rewarded.