Readers of P. D. James’s novel Children of Men won’t be prepared for the emotional breadth of the film version by Alfonso Cuarón. Like most dystopian stories, the book is relentlessly grim, icy and pedantic. Set 20 years in the future in a fascist England that barricades its borders and treats refugees like prisoners of war, the film posits a world in which, for obscure reasons, no children have been born in nearly two decades. The youngest member of the human race—still known as Baby Diego—has just been killed in a bar fight at the age of 18, prompting mass outbreaks of grief.

Clive Owen plays Theo, who was an activist in his youth but buried his political passions after he lost his child in a flu pandemic. Now he’s drawn back in when the child’s mother, Julian (Julianne Moore), now a member of a group known as the Fishes, asks him to provide safe passage for a young refugee (or “fugee”) named Kee (Claire-Hope Ashitey), who has become pregnant.

When Julian is killed in an ambush and Theo realizes that the Fishes want to use the baby to rouse popular support for “the uprising,” a coup against the government, he escapes with Kee and Miriam (Pam Ferris), a onetime midwife who has been nursing Kee. His mission is to get them sanctuary with a group called the Human Project, which no one has actually seen.

In James’s scheme, Kee is the “key” to the future of humanity. Cuarón underscores the idea that she is also an earthbound version of the Virgin Mary, carrying the miracle child of an unseen father (she isn’t sure of his identity) whose birth will change the world. She is in constant danger, both from an oppressive government that would never allow a refugee (and a woman of color) to raise the first child born in 18 years and from opportunist insurgents like the Fishes. But Kee also draws the instinctual protective sympathy of the poor and disenfranchised, like the gypsy woman Marichka (Oana Pellea), who risks her own life to get Theo and Kee off the island into waters reportedly patrolled by the Human Project. When, at the film’s climax, the Fishes stage their uprising outside the walls of a coastal prison, Theo guides Kee through the besieged ruins of an apartment building and everyone who sees her draws back in wonder.

Cuarón has carefully prepared us for this pre-Nativity moment by keeping us focused throughout the picture on the ineffable sadness of a world without children. In the most beautiful sequence, Theo and the two women take refuge in an abandoned school, its corridors waterlogged, its long-unused desks overturned, the drawings on its walls as remote a remnant of a lost age as the figures on the walls of caves. As we hear, in Ferris’s elegiac tones, Miriam’s recollection of what it was like to be a midwife when women stopped becoming pregnant and those already pregnant began to miscarry, through broken windows we see Kee in the schoolyard, rocking on a swing and singing to herself.

Theo’s heroic efforts to save Kee are linked to the death of his own son. The first place he takes Kee and Miriam is the home of his old friend Jasper (Michael Caine, in an ebullient performance), an aging hippie who lives in the country, where he harvests marijuana and takes care of a beloved wife who has stopped speaking. It’s Jasper who tells the women about Theo’s past, while Theo, overhearing, weeps silently.

Cuarón, whose previous picture was Harry Potter and the Prisoner of Azkaban, may be the most gifted filmmaker of his generation. (He’s 45.) As a piece of visual storytelling, Children of Men—shot, like most of his movies, by Emmanuel Lubezki—is the most dazzling thing he’s ever done. The sheer variety of the imagery in the last act is breathtaking. Cuarón takes us through a prison and out again into the scrambling illicit community outside its doors, which feels like a border town. His depiction of the prison alludes to Abu Ghraib, but, always in search of a fresh vision, he’s smart enough not to linger there.

Unlike James, Cuarón is not a moralist. The didactic agenda of most dystopias flattens them out; even the glittering, inventive visuals of Blade Runner can’t compensate for its chilly two-dimensionality. But Cuarón is too much of a humanist to freeze out the audience or to use the harsh details of the narrative to batter us. He’s in love with the possibilities of life, and Children of Men throbs with them.