It’s easy to snicker at the Helen Lovejoy syndrome—the inclination to respond to every situation by imploring, “But what about the children?” But some very powerful films have presented dire situations from a child’s perspective, often through the prism of fantasy—René Clément’s “Forbidden Games” or Charles Laughton’s “The Night of the Hunter,” for example, and more recently Guillermo del Toro’s “The Devil’s Backbone” and “Pan’s Labyrinth.” Issa López’s “Tigers Are Not Afraid” falls into that tradition, and while it’s not their equal, it’s quite good.

The film is set against the catastrophic drug wars in Mexico that, we’re informed at the start, have left tens of thousands dead and many children orphaned. In an unnamed town, schoolgirl Estrella (Paola Lara) is given an assignment by her teacher—to write a fairy-tale that includes elements suggested by her fellow students. Before she can do so, however, the class is disrupted by a gun battle in the street outside. While the students crouch on the floor in fear, the teacher hands Estrella three pieces of chalk to represent the wishes that are always an ingredient in fairy-tales, but in response to the violence, the school is closed.

Returning to the apartment she shares with her mother, Estrella finds the place vacant. It will eventually be revealed that her mother is one of the latest victims of the local gang, the Huascas. When she uses one of the chalk pieces to ask for what she most wants, the result is far from her hope. Too frightened and hungry to remain alone, and haunted by sounds and spectral apparitions—a thread of blood that crosses the floor toward her, a decomposing hand, a whispered word of warning from a ghoulish figure—Estrella eventually escapes through a window to the roof.

There she encounters Shine (Juan Ramón López), a kid with a terribly scarred face who has become the leader of a group of boys, all of whom—Tucsi (Hanssel Casillas), Pop (Rodrigo Cortéa) and Morro (Nery Arrendondo)—have been orphaned by the Huascas. Though initially rebuffed by the band of little outlaws who see themselves as wild animals (Morro, the smallest of them, carries a stuffed tiger that acts as a sort of mascot), Estrella soon joins them as a kind of den mother or big sister in their rooftop camp.

Shine is a nervy kid: he has stolen a cellphone and pistol from the drunken Caco (Ianis Guerrero), the leader of the Huascas who was responsible for the death of Estrella’s mother. That theft is key to what follows: Caco wants his property back, and he and his thugs pursue the kids relentlessly to get it. The situation grows more complicated when Caco is killed and Estrella takes credit for his murder, though she actually just found him dead. Caco’s boss is now more determined than ever to track down the dead man’s phone for reasons of his own, prompting Estrella’s street family to move to a more secure place—a deserted home that must have housed a well-off family, given its decaying furnishings and the fish from a koi pond still flopping about in pools of water on the floor.

The police are of no help to the children; when approached, they simply drive off to avoid trouble with the gang. And it’s clear that the so-called authorities can’t be depended on; the only representative of the political class is a candidate called El Chino (Tenoch Huerta Majia), who appears in ubiquitous ads promising to clean up the city, but proves to be the worst of the lot.

There are others who can help, however—the spirits of the dead, including Estrella’s mother, who seek vengeance on those responsible for their murders and urge the girl to lure the villains to them. Estrella’s quest is, in fact, filled with such phantasmagorical elements. The trickle of blood continues to follow her. Tigers that members of her new family have drawn on walls spring to life. Tiny bat-like creatures fly out of a cellphone. And, of course, there are the remaining pieces of chalk, the fairy-tale wishes.

But magic cannot keep the tragedy of the real world at bay. The children will suffer loss and pain en route to an ending that offers hope, but at a cost—one that require the courage the tiger represents.

Aided by her collaborators—production designer Ana Solares, DP Juan José Saravia, composer Vince Pope and editor Joaquim Marti Marques—López vividly constructs the film’s devastated world, and most of its excursions into the realm of the supernatural are equally effective. She also secures credible performances from her young actors, with Lara and López in particular standing out.

Impressively blending stark naturalism and magic realism, López has constructed an affecting portrait of children devastated by Mexico’s drug wars but resilient in the struggle to survive them.