Jai Chakrabarti’s novel “A Play for the End of the World” opens on a staging of Rabindranath Tagore’s “Dak Ghar,” a 1912 play about a quarantined child traveling the world through his imagination. In 1942, Chakrabarti’s author’s note tells us, this play was mounted in a Warsaw Ghetto orphanage where a Polish-Jewish educator and doctor known as Pan Doktor hoped to give his charges a way to persevere through dark times.

In the novel, Jaryk and Misha, who is 10 years older, are two orphans involved in the performance, which takes place four days before the first deportations to the death camps in Treblinka. Compassionate in its telling, the novel shifts between the 1940s and 1970s, and in both timelines, a production of the Tagore play represents an act of resistance. These eras are uncomfortably similar, the novel suggests — not only to each other, but also to our own.

In the later timeline, Misha has traveled from Brooklyn to an Indian village to stage “Dak Ghar” at the request of a Bengali professor with ties to radical Communist Naxalite peasants who have violently clashed with landowners. In response to uprisings, the government is stamping out protests and disappearing men. The professor asks Misha and Jaryk to help produce the play, explaining, “What I need are men who lived through the disease we’re living now.” As adults, Jaryk and Misha hold divergent views on art’s potential despite their intense, shared experience. Misha “saw the ghetto as history they should never forget and the art they’d made there as something that mattered … Misha was always looking for meaning.”

But listening to Misha wax on about poetry as a means of survival for Yiddish poet Avrom Sutzkever and others, Jaryk thinks, “it was not art that had saved Sutzkever but endurance and luck.” And Jaryk knows something about luck: His escape from a train — through a window “that was big enough just for him” — guaranteed his survival.

In 1972 Brooklyn, Jaryk receives word that Misha has died under mysterious circumstances in Shantiniketan, a neighborhood outside Kolkatabuilt up by the Tagore family. Jaryk immediately leaves behind Lucy, a southerner with whom he’s been falling in love, to retrieve his oldest friend’s ashes and find out what happened. Haunted and gentle, Jaryk has struggled to fully explain to Lucy the despair of his childhood. The pain was something he’d shared only with Misha.

When he travels to Bengal, it becomes clear that whatever misgivings Jaryk has, he wants to honor Misha’s passion for art as resistance, so he gets involved with the professor’s staging of the play with local village children who fled the violence of Bangladesh.

“What if you could have a revolution with art?” the professor wonders. “What if the exploited could stage the play themselves?” Knowing of the Warsaw Ghetto orphanage performance, the professor believes that the play should be performed by children. In a moment that hints at the lengths to which he will go to use people for his political ends, he says, “We older people are vaccinated against most strains of emotion, but the works of children occasionally manage to get through our defenses.”

Like Jhumpa Lahiri’s “The Lowland,” Chakrabarti explores his flawed, bewildered characters’ fine-grained emotional shifts when confronted with confusing, violent political movements. Both novels are woven with political history and, in particular, the influence of Communism and far-left Naxalites in what is now the state of Bengal. Both authors circle around a pivotal “moment” in which everything changed. These novelists are, at their hearts, elegists for time gone by.

The 1970s scenes in “A Play for the End of the World” are imbued with sorrow not only for what has been lost, but also what will be: “It wouldn’t strike him till later that maybe this had been his last chance,” Chakrabarti writes when Jaryk can’t bring himself to leave a message on Lucy’s answering machine. The sentence ends on the weight of “last chance,” and yet there’s the casual, cool insertion of a provisional “maybe.”

While the novel circles its characters’ internal dramas, we’re drawn on by the immense gravity of events on the global stage. “A Play for the End of the World” meditates on conundrums of agency that, unfortunately, are still relevant to artists and writers. Can art truly matter in a time of intense upheaval and turmoil over the failures and force of a government? Do words offer any effective resistance to the powerful currents of time and space or to charismatic villains determined to get their way through force? While the dominant note of Chakrabarti’s novel as it poses these questions is melancholy, it is balanced by the belief that love can be redemptive.

In staging the play, Pan Doktor hoped to prepare Jewish orphans for what they were about to face. Yet he also hoped that given enough time, stale bread would be supplanted by freshly baked cake, black boots by roller skates. The doctor’s healing impulse — his desire to infuse meaning into the brutal, while maintaining awareness of reality — serves as the novel’s intention as well. It seems to ask us: Are you struggling in this moment? And it answers, here, let me help you bear this.

Anita Felicelli is the author of the novel “Chimerica” and the short story collection “Love Songs for a Lost Continent.”