The past and present are a terrifying blur in “Transit,” a time-space puzzle that opens amid wailing police sirens. A solitary man in a cafe sipping espresso is soon joined by a second man who gives him a name: Georg.

“Why are you still here?” the second man asks. It is Paris during the German occupation, and the city is being sealed off. In urgent tones, they discuss visas, danger, money. Georg agrees to deliver two letters and then steps into streets filled with jackboots and terror. In doing so, he also steps into another dimension in which German forces are flooding into present-day Paris.

An existential thriller about loss, trauma, statelessness and historical amnesia, “Transit” is the latest from electrifying German director Christian Petzold, who is best known in the United States for “Barbara,” a slow-burning drama about an East German doctor who decides to voluntarily remain in a totalitarian dictatorship. There are no such choices in “Transit,” where leaving is a high-stakes necessity for Georg and the desperate, panicked refugees around him. To stay is to die.

Georg (a transfixing Franz Rogowski) is meant to deliver the letters to a writer who turns out to have died by suicide, leaving behind a manual typewriter, a manuscript and a room washed in blood. “He caused me more trouble than the occupation,” a hotel worker grouses.

Before long, Georg is dodging shock troops in a heart-thumping chase, and the conventional sense of time, with its reassuring sense of progress, has been undone.

The movie is based on a 1944 novel by German author Anna Seghers that draws on her experience as a Jewish war refugee. Petzold’s great stroke in adapting the book is to situate it in a historically indeterminate moment, overlapping past and present. He does this subtly; as the movie unfolds, its period remains slyly, artfully indefinite.

Georg is on the run — he’s soon in Marseilles — and also firmly located in his own time and space. (He doesn’t look lost in time, though you might be.) The soldiers storming Paris look like contemporary riot police, and the streets are filled with current cars and passers-by in modern clothes.

In Marseilles, the plot thickens, the danger escalates, and the emotional temperature spikes. Georg assumes the identity of the dead writer, which introduces yet more complications. He also enters dramatically fraught relationships with other anxious refugees, including Marie (Paula Beer), the dead writer’s wife. A sad, jittery beauty, Marie doesn’t know that her husband is dead or that Georg has assumed his identity.

By turns intimate and expansive, “Transit” is a thrilling, at times harrowing labyrinth of a movie. Petzold embraces ambiguity as a principle but also sometimes gives the movie the accelerated pulse of an action flick: There are chases, fear at the door, screams in the night.

The typewritten manuscript pages are excerpts from Seghers’ novel, which opens up mind-bending possibilities: Is Georg caught in a time loop, repeating history, or is he living in a present that is inseparable from the past?