Spike Lee has made a couple of masterful films–“Do the Right Thing” (1989) and “Malcolm X” (1992). But his recent feature career has been disappointing. Apart from non-fiction efforts like “4 Little Girls” (1997) and the filmed concert piece “The Original Kings of Comedy” (2000), he hasn’t directed a picture with more strengths than weaknesses since “Clockers” (1995). That’s why it’s such a pleasure to welcome “25th Hour.” It may not match his finest work, but it’s Lee’s best film in years, a solid, substantial picture made with taste and style and carrying considerable emotional punch.

The screenplay, adapted by David Benioff from his own novel, details the last day of freedom for a convicted New York City drug dealer named Monty Brogan (Edward Norton), who has to report the following morning to begin a seven-year stint in the state pen. The episodic narrative basically follows Monty–an intelligent, sad-faced guy–as he reflects ruefully on his past and fearfully on his future while almost ritualistically saying his goodbyes to friends and family. His connection with live-in girlfriend Naturelle (Rosario Dawson) is strained, since he suspects that she might have turned him in to the authorities, and his Russian boss Nikolai (Levani) is understandably concerned that he might turn state’s evidence in return for special treatment. Nonetheless after a difficult dinner with his widowed father James (Brian Cox), a bar owner who blames himself for his son’s troubles and insists on driving him to the penitentiary the next morning, Brogan sets out for a final party at Nikolai’s nightclub with Naturelle and two of his oldest friends–Francis (Barry Pepper), a high-octane Wall Street trader, and Jacob (Philip Seymour Hoffman), a rumpled, guilt-ridden high school teacher. There the tensions among the characters come to a head, a major revelation occurs, and ultimately friendships are seriously tested when Monty asks his buddies for a favor.

Employing a clever mixture of contemporary dialogue sequences and telling flashbacks, Benioff and Lee build a compelling portrait of Brogan’s life and relationships (although they conspicuously ignore how he got into the drug trade). They’re nearly as successful in sketching Francis and Jacob, especially in terms of the former’s ambivalent attitude toward Naturelle and the latter’s improper interest in one of his students, the provocative Mary (Anna Paquin), who shows up outside Nikolai’s just as the party arrives and contrives to accompany them inside. In a few brief strokes James’ despondency is also skillfully sketched. (The female characters–Naturelle and Mary–are, unhappily, less successfully delineated, and all but the most rabid canine lovers will probably feel that too much attention is paid to Monty’s dog, a mutt we see him rescue in the opening scene and of which he becomes very solicitous. Yes, his treatment of the animal is meant to represent his underlying humanity, but it still strikes one as an obvious device.)

For the most part Lee directs in an uncharacteristically straightforward style, generally eschewing the extreme floridness he’s often embraced. He does, however, insert several virtuoso sequences, which serve almost like breathtaking cadenzas. The first, interrupting Monty’s dinner with his dad, is an extended restroom rant the younger man delivers into a mirror, recalling the bigotry-laced montage that was so memorable in “Do the Right Thing.” The second, set in Nikolai’s club, involves Jacob’s surrealistic encounter with Mary. And the last, and most overwhelming, is an alternate ending that James proposes for his son at the close of the film–a hallucinatory dream of what might have been that’s achingly poignant. While it could be argued that these visually extravagant episodes are dramatically intrusive, they’re also part of Lee’s signature style, and they’re exceptionally well handled here; the picture would be more cinematically chaste without them, but it would lose some of its power and vitality. And throughout the cinematography of Rodrigo Prieto is supportive and often striking.

Edward Norton isn’t the first actor one might think of to play Monty, either in terms of the character’s hard edges or his appearance, which is supposedly so handsome that it insures him a tough ride in prison, but he rebounds from “Death to Smoochy” to draw a deft, finally moving portrait of a basically bright guy who’s gotten off the right path. Pepper is better than he’s ever been before as the high-pressured Francis, and Hoffman partners him beautifully as the perpetually slouching, hangdog Jacob. Dawson and Paquin bring more to their roles than the script affords, and Cox, who’s quickly becoming an almost ubiquitous presence in Hollywood films, brilliantly portrays a worn-down man almost desperate at long last to show real affection for his boy.

A final nod should be made to Terence Blanchard’s brooding, insistent score, which–like Lee’s set-pieces–might strike some as intrusive but actually adds a good deal of power to a film that raises essentially pulpish material to the level of moody cinematic poetry.