The grisly terror-attack docudrama Hotel Mumbai opens with heavily armed jihadists entering the city, boosting their resolve with pep talks and prayer — “God is great,” says one.

Inside the targeted Taj Hotel, the executive chef Hemant Oberoi (Anupam Kher) invokes a Hindu saying that serves as his guiding principle for the staff: “The guest is God.”

The contrast is stark and deliberate, and deepens as the movie goes about its bloody business of recounting the 2008 attacks (more than 170 killed during four days of coordinated Lashkar-e-Taiba attacks on multiple sites). This could easily be framed as a clash of civilizations, but the movie tilts it a different way, as a clash between religious nihilists and civilization itself, with the Taj as the microcosm of all that is cosmopolitan, accommodating, and tolerant.

The cinematic idea of the posh hotel as a busy, blended hub of humanity goes all the way back to 1932 and Grand Hotel, and Hotel Mumbai has a more direct descendant in the docudrama Hotel Rwanda, where the hotel served as a refuge of sanity and decency in the midst of frenzied genocidal slaughter.

Mumbai also has less reputable lineage, inherited from disaster movies — we see quick introductions to a mostly sympathetic cast of potential victims and survivors, crosscut with images of armed gunmen preparing for assault.

Armie Hammer and Nazanin Boniadi, for instance, are a wealthy couple with an infant son in the care of a nanny, and director Anthony Maras sees no shame in showing a terrorist pulling an AK-47 out of a backpack, then cutting immediately to the nanny giving the baby his bottle.

The exhausting Who’s Next tension only intensifies as the movie proceeds with its unsparing presentation of the close-range, double-tap assassination of dozens of people. This is borderline unendurable, but it does provide context for the parallel and more adroitly handled drama of hotel employees who volunteer to stay on duty, and who work diligently and bravely to save as many guests as possible.

Somewhere, some Twitter revolutionary will probably write this off as a conditioned underclass reflexively and obsequiously tending to capitalist overlords, but Hotel Mumbai is exploring something deeper here. “The guest is God” — this expresses not only a cultural belief but a larger idea of hospitality as a mode of conduct that, across nations and centuries, has been a keystone of pluralistic societies.

The staff is not guided or motivated by transactional considerations. Which is not to say that those who volunteer to stay and protect the guests do not deserve an amazing tip. One is Arjun (Dev Patel), working extra shifts because he has a pregnant wife at home. He puts his life on the line several times, yet is calm enough to gently deal with a terrified guest who thinks he might be “one of them.”

Hotel Mumbai sometimes surrenders to melodrama and action-genre imperatives, and it mixes actual people like Oberoi with fictional composites in a way that strays from the stringent just-the-facts discipline of a docudrama like United 93. But there is value, too, in its subjective approach. It is used here to celebrate “ordinary” heroes, and it’s hard not to conclude that they deserve it.

Hotel Mumbai

Directed by Anthony Maras. With Dev Patel, Anupam Kher, Armie Hammer, Nazanin Boniadi, and Jason Isaacs. Distributed by Bleecker Street.

Running time: 2 hours, 3 minutes

Parents’ guide: R, violence

Playing at: Area theaters