“Miracle At St. Anna” is a major disappointment. It was exciting to imagine what Spike Lee might do with a big, old-fashioned World War II movie, but he has bitten off much more than he can chew.

Lee, always an inconsistent filmmaker, had been on an upswing recently. “Inside Man” was a lark of a heist flick in love with the multicultural beauty of New York. “When The Levees Broke,” a four-hour documentary on Hurricane Katrina, is, along with “Do The Right Thing,” his best work: scathing, elegiac and indispensable. But “Miracle” lacks both the precision that served Lee so well in “Inside Man” and the focused, politicized tone of “Levees.” He swings in different directions and winds up with a bloated, rudderless — and, at 160 minutes, very, very long — film that, in the end, can’t quite justify itself.

This is a film that doesn’t know what it wants. Is it a mystical tale of miracles? A hard-eyed look at the complications of being a black soldier in a segregated army? A “Saving Private Ryan”-style gritty battle picture? A story of romance in wartime? “Miracle” tries to be all of these things and winds up succeeding at none of them. Each strand of the story is effective in spurts — a glimpse of racism in a Louisiana diner, or the final battle sequence, for instance — but because Lee is trying to cram so much into his film, none of it sticks. The cinematography is elegant and classicist, the music stirring, the acting decent and several sequences very moving, but it adds up to very little: bursts of interest surrounded by miles of dullness.

Most of the story takes place in Italy in 1944 and centers around four members of the Buffalo Soldiers, the only all-black unit to fight in Europe. (The military would be desegregated in 1948.) Hector Negron (Laz Alonso), Bishop Cummings (Michael Ealy), Aubrey Stamps (Derek Luke) and Sam Train (Omar Benson Miller) wind up trapped in a postcard-perfect Italian village after Train rescues Angelo (Matteo Sciabordi), an Italian orphan, and needs a place to put him. The soldiers are surrounded by Nazis on all sides — Lee gives us close-ups of gleaming swatstikas in a melodramatic, effective flourish — and are hampered by racist white superiors who don’t trust their judgement and lead many of their compatriots to their death. In the village, we meet the Italians who will aid the soldiers, especially the beautiful Renata (Valentina Cervi). (Lee, lech that he is, can’t help himself, and we get not one, but two, gratuitous nude scenes.) And there is a separate storyline featuring still more Italians, one of whom is collaborating with the Nazis against his anti-Fascist friends.

All of these different angles converge at the end of “Miracle,” but by then it’s been more than two hours and we’re bored stiff, even as betrayals are unearthed, friends are slain and the soundtrack swells.

“Miracle” is based on a novel by James McBride, and it translates poorly to the screen. This is a story of epic sprawl that might work on the page, where there is more space to let the story and the characters unfurl. McBride, who also wrote the script, clearly didn’t want to cut any of the plot or people out, but couldn’t give them the time they needed. We wind up with the least desirable situation: a dizzying array of characters is introduced and most of them are given short shrift. Especially ineffective is a love triangle that generates zero heat and the religious, sentimental overtones that accompany Angelo, the little boy, and his story. (He’s also involved in the unfortunate closing minutes, ripped wholesale from “The Shawshank Redemption.”)

Lee would have been wise to choose one of these stories and flesh it out. (Having McBride adapt his own screenplay probably made that impossible.) Perhaps better would have been more focus put on what it feels like to fight for a country that doesn’t fight for you. We get a few conversations about the ambivalence these soldiers have toward the bigoted country they represent, but they get lost amid the clutter. A movie about Italian villagers in wartime could also have been fascinating. By trying to be everything to all the people, Lee has crafted a shapeless mess — “Miracle At St. Anna” could have lost a half hour and still included the entire plot. Next time, he would be wise to scale back his ambitions and concentrate instead on telling a decent tale.