Spike Lee has craftsmanship to spare. His cinematic technique is always impressive, employing striking visuals and eye-catching compositions to hold the viewer’s interest and give a jolt to even conventional material. It’s elevated pictures like “The 25th Hour” and “The Inside Man” considerably, and in some cases—like “Do the Right Thing” and “Malcolm X” (as well as his documentaries)—he’s used it in connection with his personal passions to fashion films that are really quite breathtaking in terms of both content and style.

Unfortunately, too often when Lee has taken up subject that he feels deeply about, he’s allowed his emotion to swamp his skill in terms of pure storytelling, and the result has been messy, overwrought movies that flail all over the place in an effort to make a point. They’ve often been more like flamboyant rants than carefully crafted and argued pieces of exposition.

“Miracle at St. Anna” isn’t as bad an example of that problem as some of Lee’s pictures, but it shares their flaws. It’s certainly about a historical circumstance that Lee has long wanted to dramatize—the contribution of black American soldiers to the military efforts of the U.S. during World War II, despite the bigotry that they continually faced back home, and even among the white soldiers who were supposedly their comrades-in-arms. And the director has certainly applied his virtuoso abilities to it—many individual sequences are quite stunning. Unfortunately, in spite of some remarkable elements, the film overall is poorly constructed and tonally discordant; and so the whole is less than the sum of its parts.

The major fault lies in a screenplay that mixes too many very different threads—one part intriguing murder mystery, another part raw wartime drama, a third a discourse on prejudice, a fourth a mawkishly sentimental tale of awkward encounters between civilians and soldiers (including a bonding between a man and an orphaned child), a fifth a tale of betrayal among resistance fighters, a sixth infighting among the soldiers themselves, another with a mystical component—all of them veering stylistically from a kind of heightened realism to near-surrealism. The picture lurches uncomfortably from storyline to storyline and from approach to approach, and often the marriage between the two is jarring.

That’s the case early on: the picture begins with a bang in the early 1980s as an aging postal clerk (Laz Alonso) abruptly shoots a customer (Sergio Albelli) and the cop assigned to investigate (John Turturro) converses with a callow young reporter (Joseph Gordon-Levitt). It’s actually a pretty simple series of events, but Lee stages it extravagantly, in a look reminiscent of early De Palma; when he gets to the discussion between Turturro and Gordon-Levitt, he has the camera swirl around them as incessantly as it did at the end of “Blow Out” (or, less effectively in Stanley Kramer’s “Judgment at Nuremberg”). The flourish is exhilarating from a purely technical standpoint, but what more it adds isn’t very clear.

That odd fit between what’s being shown and how it’s shown continues through the picture, including the succeeding 1980s scenes in which there’s discovered in the closet of the gunman’s apartment an artistically significant item—a stone head from a Florentine bridge destroyed by the Nazis back in 1944.

But the curious juxtaposition of content and expression is actually secondary to that among the narrative threads of the picture which, after the eighties introduction, is—apart from a finale that returns to 1983 and offers a weirdly unsuccessful attempt at uplift—one long flashback. Basically it’s the story of four G.I.s, members of an “experimental” Buffalo Soldiers brigade fighting in northern Italy in 1944 (Alonso, Derek Luke, Michael Ealy and Omar Benson Miller), who get trapped behind German lines after their own artillery bomb their location and, together with German fire, kill most of their company. It’s not long before the hulking, sweet-tempered Miller—who’s carrying that stone head as a good-luck charm—comes upon a solitary Italian boy (Matteo Sciabordi) and becomes the protector of the lad, who’s obviously suffering from some sort of shock, holding conversations as he does with an imaginary friend. The quartet eventually make their way to a mountain village where they connect with the locals, including a pro-fascist old man (Omero Antonutti) and a beautiful English-speaking girl (Valentina Cerri) to whom two of the grunts are attracted. Then there show up a band of anti-Mussolini partisans led by a celebrated guerilla (Grotta Pierfrancesco Favino) that the Germans are intent are capturing, who’s accompanied by his closest comrade (Albelli). They have a captive, a German who’s on the run from his comrades (and, as it happens, has witnessed a terrible event involving the boy), and whom the Americans want to take charge of. And the German forces are closing in on the town, searching for both their own AWOL comrade and the partisans.

It might have been possible to meld these disparate story threads into a smooth, coherent narrative, but Lee doesn’t manage the trick. The film jumps haphazardly from brutal combat sequence to sweet boy-and-man scenes, from sultry romantic moments to comic interludes among the townsfolk, from scenes of good and bad Germans in conflict to those of partisans fighting among themselves, from genial party episodes to bloody massacres. Periodically Lee pauses to add speeches about bigotry (he even tosses in a flashback-within-the-flashback showing how the men were treated horribly by locals during their stateside training). And the style changes as often as the narrative shifts. The result is that though individual moments carry considerable power, they never combine into an effective whole; the picture lumbers along from episode to episode without ever achieving an overarching vision.

And while the cast do what is required of them well enough, no one ever escapes the purely ensemble feel to emerge as truly distinctive, apart from Miller, whose cuddly teddy-bear girth and gentle giant manner can’t help but make him noticeable. (Apart from Turturro, John Leguizamo, D.B. Sweeney and Robert John Burke show up in cameos, none to any particular effect.) Technically the film is only sporadically impressive too, with Matthew Libatique’s widescreen cinematography capturing some striking images even if it never manages to match again the opening scene of carnage as the brigade is mowed down, which Lee stages beautifully and Libatique shoots equally well. (It’s also superbly edited by Barry Alexander Brown, who elsewhere lets things get bogged down badly, resulting in an excessively epic running-time of 160minutes.) And while Terence Blanchard’s score is initially effective, it seems to grow louder and more blatant as the picture goes on.

There’s some reason to see the film for its sporadic moments of brilliance, but overall it can’t match Lee’s best work. “St. Anna” winds up being more well-meaning muddle than miracle.