"The First Deadly Sin," a grimly absorbing police melodrama about the last case of an aging, sorely tried New York homicide detective, navigates along the edge of self-destructive fatalism and pathos.

It almost plunges over the edge at the fadeout, but it's a more fascinating and impressive downer than you might anticipate.

The movie begins with alarming impact, intercutting a brutal bludgeoning on the West Side with the attempt to rush a stricken patient to the emergency ward. Both become the intimate concern of a single character: the police detective officiating at the murder site is also revealed to be the husband of the stricken patient. As the plot unfolds, this cop's determination to find the West Side killer -- who uses some kind of sharp tool that punctures the skull of his victims -- is intertwined with his anxieties about his wife's precarious condition.

As the detective protagonist, Sgt. Edward X. Delaney, Frank Sinatra has returned from a prolonged absence with a certain distinction. Ironically, the role of Delaney suggests an older, wearier variation of "Dirty Harry" Callahan, a character Sinatra seriously considered playing before it was revamped with sensational results for Clint Eastwood.

Like Callahan, Delaney in the film is portrayed as a dedicated, frustrated big-city lawman who believes he must take the law into his own hands to stop a psychotic fiend. Delaney's efforts to identify and then stalk the killer are complicated by his personal crisis -- the hospitalization of his wife (Faye Dunaway) with a mysterious kidney ailment. It is also intensified by professional interference -- his new supervisor (Anthony Zerbe) would prefer that the sergeant, only a few weeks away from retirement, fade peacefully into the background rather than stir up the department with hunches about a mass murderer.

The movie leaves the impression that Delaney is taking his final bow, but novelist Lawrence Sanders revived him a second best-seller called "The Second Deadly Sin." It appears as if Delaney may be solving murders indefinitely in the tradition of methodical, morose forerunners like Inspectors Maigret and Martin Beck. Sinatra has always been a low-key natural, and at this stage of his career he is an effective embodiment of the careworn, sober old sleuth. His discretion is marvelously evident in bedside scenes with Dunaway, who is not an astute choice as a dying middle-aged wife. Sinatra's voice betrays a peculiar huskiness when he's speaking to Dunaway; Delaney won't allow himself to break down in his wife's presence, but he sounds subtly different when trying to comfort her.

Surviving a potentially bathetic device, Sinatra remains oddly affecting when reading passages from a children's book that Mrs. Delaney fondly remembers. His performance falters only in the sequences where Delaney is obliged to resort to physical violence.

Brian G. Hutton, a capable director ("The Wild Seed," "Where Eagles Dare," "Kelly's Heroes") whose career has been in limbo, returns to active duty in encouraging style. The performances are strongly reinforced by the director's intent, incisive observation or ominous, suspenseful puncuation.

With the exception of Dunaway, who never seems at all convincing on a bed of pain, the cast seems admirably chosen and remarkably authentic. Even the pomposities of a habitual overactor like Martin Gabel are agreeably rationalized by the role he plays in this story: an elderly museum curator who volunteers to help Delaney locate the exotic murder weapon, a kind of alpenstock.

Sinatra seems to encounter exceptional supporting actors everywhere: James Whitmore as a brisk coroner, Joe Spinell as a suspicious but bribeable doorman, Robert Weil as the congenial proprietor of a sporting-goods shop, Zerbe as the officious new police chief, George Coe as the wife's infuriating doctor, and finally, David Dukes as the murderer, whose shadowy presence and motives are more than sufficiently explained by the chilling impression of madness imposed by the actor himself.

Jack Priestley, who originally made his reputation as a cinematographer on the "Naked City" TV series, helps create a consistently somber, sinister pictorial mood, whether the setting is windy, rainswept night streets or bleakly realistic interiors, from a police precinct to a hospital to a luxury apartment house. Gordon Jenkins' score is also notable for some discreetly effective undercurrents, especially in the sequence depicting Delaney tailing his suspect prior to their climactic confrontation.

The weaknesses belong more to the conception of the story than its execution. It seems a bit much to link the urgency Delaney feels about his wife with his urgency about apprehending the killer.Usually tart and believable, the dialogue will sometimes betray the tendency of the story to wear a soggy heart on its sleeve by lamenting the Injustice of It All and suggesting that conditions make it impossible for a pro as honest as Delaney to do an honest or effective job. The sentimental affectations aside, "The First Deadly Sin" is a surprisingly solid piece of genre moviemaking.