The mosque, a tiled, walled fortress the size of a city block on the Left Bank, served as a place to pray, certainly, but also as an oasis of calm where visitors were fed and clothed and could bathe, and where they could talk freely and rest in the garden.

It was possible for a Jew to pass.

“This film is an event,” said Benjamin Stora, France’s pre-eminent historian on North Africa and a consultant on the film. “Much has been written about Muslim collaboration with the Nazis. But it has not been widely known that Muslims helped Jews. There are still stories to be told, to be written.”

The film, directed by Ismaël Ferroukhi, is described as fiction inspired by real events and built around the stories of two real-life figures (along with a made-up black marketeer). The veteran French actor Michael Lonsdale plays Benghabrit, an Algerian-born religious leader and a clever political maneuverer who gave tours of the mosque to German officers and their wives even as he apparently used it to help Jews.

Mahmoud Shalaby, a Palestinian actor living in Israel, plays Salim — originally Simon — Hilali, who was Paris’s most popular Arabic-language singer, a Jew who survived the Holocaust by posing as a Muslim. (To make the assumed identity credible, Benghabrit had the name of Hilali’s grandfather engraved on a tombstone in the Muslim cemetery in the Paris suburb of Bobigny, according to French obituaries about the singer. In one tense scene in the film a German soldier intent on proving that Hilali is a Jew, takes him to the cemetery to identify it.)

The historical record remains incomplete, because documentation is sketchy. Help was provided to Jews on an ad hoc basis and was not part of any organized movement by the mosque. The number of Jews who benefited is not known. The most graphic account, never corroborated, was given by Albert Assouline, a North African Jew who escaped from a German prison camp. He claimed that more than 1,700 resistance fighters — including Jews but also a lesser number of Muslims and Christians — found refuge in the mosque’s underground caverns, and that the rector provided many Jews with certificates of Muslim identity.