(Melville House)

Is the world ready for a hard-boiled Hitler? “A Man Lies Dreaming,” Lavie Tidhar’s stunning alternative take on the Holocaust, audaciously imagines the 20th-century demon as a middling private detective named Wolf.

It’s November 1939, six years after Germany’s Communist Party trounced Wolf’s National Socialists in the country’s election. The disgraced and debased Wolf (his name a nod to the German meaning of Adolf) has fled to England, like many other refugees. There he has hung out a shingle in London’s seedy Soho, among the whores and corrupt coppers, and a serial killer who is seeking to frame him. One day, a beautiful young Jewish woman comes to Wolf, asking for help finding her sister.

“I looked at her face. She was nothing but trouble and I knew it and she knew I knew,” Wolf writes in a voice icy as that of any classic gumshoe. “I had no business hunting for Jews in the year of our Lord 1939. I once had faith, and a destiny, but I had lost both and I guess I’d never recovered either. All I could see was the money. I was so cold, and it was going to be a cold winter.”

Wolf’s search quickly leads him to a slaver’s den run by Hermann Göring, once a fellow leader of the National Socialists, now a wealthy pimp. But before you can say Philip Marlowe, Tidhar’s narrative abruptly shifts.

Author Lavie Tidhar. (Kevin Nixon)

Now we’re in Auschwitz, and a man named Shomer lies dreaming the noir novel we are reading. Before his imprisonment, Shomer was a successful writer of shund, pulp fiction. His wife and two young children have been exterminated in the camp. He spends his days digging graves and his nights lost “in that murky half-world which was once his novelist’s mind.” He fights against any memory of the world that’s been destroyed, as well as that murky half-world he inhabits when he sleeps.

“Stories, stories, he is sick to death of stories! Yet they are all he has.”

Tidhar, who was born in Israel and is now based in London, lost most of his family in Auschwitz. In this novel, as in earlier ones, he uses his impressive talent to create brilliantly subversive alternate histories. His 2011 novel “Osama” features Osama Bin Laden as the renegade antihero of a popular series of novels within a novel, and his 2013 novel “The Violent Century” imagines a world where superheroes are as common as soldiers and accountants.

Numerous historical figures appear in his new book: the British fascist Oswald Mosley, Diana Mitford and her sister Unity (the latter as besotted with Wolf as she was with Hitler in real life), Rudolf Hess, Ian Fleming, Christopher Isherwood, Evelyn Waugh. Shomer himself is inspired by a late 19th-century writer whose pen name was Shomer.

Despite its dark subject, “Man Lies Dreaming” can be very funny, as in a scene where Wolf runs into Leni Riefenstahl, who is starring in an unlikely sequel to “The Great Gatsby.” It is also remarkably poignant. Once Mosley’s Brownshirts come into power, the diminished, Jew-hating Wolf faces a Jew’s fate — and, ironically, perhaps an insight of what it means to be a Jew. He remains reprehensible, but Wolf is not a monster: frightened by the sight of rioting refugees, “he saw himself bared, ugly in the mirror of their suffering.”

Set during the election of a demagogue who battens on the fears of an underemployed populace threatened by thousands of foreign-born refugees, “A Man Lies Dreaming” feels disturbingly prescient. Tidhar holds up a mirror not just to Wolf, but to ourselves. In doing so, he reminds us that even — especially — under the most terrible of circumstances, stories are all we have. And in the right hands, they can be a formidable weapon.

Elizabeth Hand is a novelist whose thriller, “Hard Light,” will be published in April.

a man lies dreaming

by Lavie Tidhar

Melville House. 307 pp. $25.95