Midnight's Children, Salman Rushdie's allegorical novel, tells the parallel stories of a boy and his nation, from birth through evolution to revolution. In the foreground is Saleem Sinai, born in 1947, at the same moment as the newly independent India and Pakistan. In the background there's his subcontinent - partitioned, turbulent, and, like the protagonist, "forever washing itself with the blood of its birth."

Though Saleem (Satya Bhabha) believes himself to be the son of an affluent Muslim family, he is in fact the biological child of an English colonial and an impoverished street musician. Switched at birth by a nurse who wants the poor baby to enjoy privilege and the rich one, Shiva (Siddharth), to live on the streets, Saleem experiences both the grandeur and the grinding poverty of India and Pakistan between 1947 and 1977.

Rushdie adapted his own magical-realist novel for director Deepa Mehta's ambitious if incompletely realized film, doing double duty as its narrator. Saleem, Shiva, and others born at the midnight of independence have special powers insufficiently explained by this bustling story. Children of the complicated legacy of colonialism, they represent many languages and faiths.

Originally published in 1981, Midnight's Children is a forerunner of Forrest Gump, a conflation of a man, a generation, and a nation. Mehta's film is like the Robert Zemeckis parable in that it follows its baby-boom hero through poverty and wealth, war and peace, loneliness and love. Unlike Gump, it neither pities nor lampoons its main character. And it is far subtler in suggesting how the hero and his nation(s) mirror each other.

And yet, and yet. While Mehta (Bollywood / Hollywood, Water) is a gifted filmmaker, her 21/2-hour movie has the momentum of the narrative nudge rather than the epic sweep. This, coupled with the abrupt tonal shifts of history - youthful exuberance giving way to gruesome war - is challenging.

For all its shortcomings, Midnight's Children draws a map of India and Pakistan, and vividly redraws it in blood, hope, and tears. In her movie, which jumps from Agra to Delhi, Bombay to Rawalpindi, Mehta shows how the 1947 partition and successive governments, protests, wars, and population shifts may change the subcontinent's boundaries but not necessarily its citizens. (Eerily, Mehta represents the period of the Emergency, the suspension of civil liberties imposed by Prime Minister Indira Gandhi in the 1970s, as an era of permanent darkness in which the sun never shines.)

Her movie may sometimes stumble cinematically, but it succeeds as a portrait of a man and a nation. Just as I found myself most frustrated by the film's pacing, I found myself most moved. Where the leaders of India and Pakistan define their countries in terms of blood, geography, and faith, Saleem resists imposed boundaries and definitions. The recurring theme of Midnight's Children - you might say its moral - is that whenever political leaders govern by exclusion, people like Saleem will fight for inclusion.

Directed by Deepa Mehta. With Satya Bhabha, Siddharth, and Seema Biswas. Distributed by Paladin Films.

Running time: 2 hours, 26 mins.

Parent's guide: No MPAA rating (brief nudity, discreet sex, violence, war scenes)

Playing at: Ritz Five