A list of history’s mythic tricksters, Lewis Hyde says in his book “Trickster Makes This World” (1998), would be endless. Since the trickster is culture’s ultimate shape-shifting, boundary-crossing figure, “there will be some sort of representative wherever humans invent boundaries, which is to say, everywhere.” Hyde refers in passing to one of Europe’s most notorious tricksters, Till Eulenspiegel, who enters folk literature in the early sixteenth century but is supposed to have flourished earlier, in the fourteenth, crossing back and forth like a picaresque hero across his native Germany, the Netherlands, and Bohemia. Till was likely as ambiguous as the culture required: a dangerous vagrant, a folk hero, a journeyman magician, a bawdy circus performer, a jester and prankster who, like the Shakespearean Fool, recklessly needled those in power into looking honestly at themselves.

Like most great comic figures, the trickster embodies a kind of secular eternity—being unruly life itself, he is as unkillable as the Devil. Just as he is about to be captured and defeated, he slips away, to furnish another tale. Our less playful era tends to simplify such survivalism, awarding superhuman status to triumphant comic-book heroes or to grimly effective action figures, who survive so that they can reappear in lucrative sequels—Jason Bourne swimming away in the East River toward the next installment. “Tyll” (Pantheon), a new novel by the German writer Daniel Kehlmann, turns back to the earlier ambiguity, reanimating the old German chronicle of mobile mischief by placing its protagonist, Tyll Ulenspiegel, in a deeply imagined early-seventeenth-century world, a Europe ruined by the Thirty Years’ War (1618-48).

I dimly recall studying that catastrophic event, best known perhaps for the brief appearance of “the Winter King” and for the Peace of Westphalia, which brought it to an end. Yet the conflict was one of comprehensive brutality and misery: millions were killed or displaced by battle, looting, and plague. At narrative ground level, the war is useful to Kehlmann as a plot prodder. Tyll is caught up in battles and royal intrigues; he switches from one side to another, hides out in a destroyed abbey, is apprehended by the Kaiser’s men, joins the court-in-exile of “the Winter Queen” as a licensed Fool, and so on. We are offered vivid descriptions of villages burned to the ground, forests cut down, stinking encampments, the hungry and the sick wandering without help. This comes with the historical territory. Kehlmann, a confident magician himself, plays his bright pages like cards. But he has a deeper purpose, which is revealed only gradually, as the grand climacteric of his chosen war steadily justifies its presence in the novel.

A remote historical period, rollicking picaresque episodes, tricksters and magic, ancient foggy chronicles—all the dangers of the historical novel are here. The reader fears the modern writer’s alienation from these distant events, the threat of steaming information dumps, comedy at once broad and shallow, untethered realism ballooning into pure fantasy. It’s a pleasure to report that “Tyll” indulges in none of that (or as little as is generically possible). Kehlmann is a gifted and sensitive storyteller, who understands that stories originate within communities, and that such stories are convincingly dramatized when the novelist selflessly inhabits his characters’ perspectives. Historical fiction makes the challenge of this authorial disappearance more acute, but also simpler: when a world view is remote, the appropriate novelistic response is to suppress any itching modernity and become that world view in order to salvage it for contemporary readers.

We see the novelist vanish in this way as Kehlmann establishes, in his early pages, the rich limits of the life that Tyll will eventually escape. Here is the boy Tyll, ceaselessly practicing how to walk a tightrope. He falls, and falls again: “It is not possible to walk on a rope. That is clear. Human feet aren’t made for it. Why attempt it at all?” Around him is the village, the only world he knows. Most of the nearby fields are owned by Peter Steger: “Most of the animals too, which is easy to tell, for they have his brand on their necks.” Here is Jakob Brantner’s cowshed, and Martin Holtz’s bakery, and here is the miller, Claus Ulenspiegel, Tyll’s father, sitting at a table, doing what pleases him best: speculating. What is time? Does Hell exist? What are stars, and how many are there? “Recently the boy had asked him how many stars there actually are, and because only a short while ago Claus had counted, he was, not without pride, able to give him an answer.” Tyll “has heard his father say everything that can be said.”

Claus is an autodidact who has scavenged a large library; the book that most fascinates him is the one he hasn’t read, because he doesn’t know Latin. He’s the village sage, a dispenser of healing balms and spells, a Christian who trusts in the protection of painted pentagrams. When his wife collapses, he draws one on her forehead and starts to speak: “Christ was born in Bedlem, baptized in tho flem Jordan. Also tho flem astode, also astond thi blode. In nomine Patris et Filii et Spiritus Sancti. . . . He knows only roughly what this means, but the spell is ancient and he knows none stronger to stanch bleeding.” (Kehlmann’s shrewd translator, Ross Benjamin, vigorously grasps the offered challenges.)

Claus’s activities excite the attention of two roving Jesuit inquisitors, Dr. Tesimond and Dr. Kircher, characters who reappear in the novel like sinister sidekicks out of Kafka (and who are modelled on their historical counterparts, Oswald Tesimond and Athanasius Kircher). They trick Claus into further speculation, then torture a confession of heresy out of him, easy enough since he is so humble. “It’s obvious that he did something wrong in his stupid head, or else he wouldn’t be here,” Claus reflects, in prison. At his trial, he artlessly admits to helping the sick “according to the old way”: