There’s a reason why some of the most successful TV dramas and films—most recently, The Crown and The Darkest Hour—offer a mix of fact and fiction in portraying history. Or why historical novels—on the surface, an oxymoronic genre—remain immensely popular.

When done well, those hybrid creations both entertain and enlighten, allowing viewers and readers to vicariously accompany their protagonists as they struggle with the tumultuous events of their eras. But when done badly, they can be woefully misleading, especially at a time when many people’s knowledge of history is based almost solely on such forms of entertainment.

As someone who writes nonfiction books about World War II and the Third Reich but who also wrote a novel about Hitler’s early years, I realize it would be folly to try to spell out any set of rules to encourage the former while discouraging the latter. Yet I also believe that that those who produce or write these dramas have a responsibility to ground them in a strong, intellectually honest sense of history, even while taking liberties with their settings and characters. It’s then up to viewers and readers to judge the extent to which they succeed or fail in doing so.

Two earlier examples illustrate the range of possibilities. In 1978, the NBC miniseries The Holocaust riveted not just American but also German viewers with its vivid portrayal of a Jewish family and an ambitious lawyer who turns into a SS mass murderer. While trials of Nazi perpetrators had already played a significant role in sparking debates about the legacy of the Third Reich, particularly among students, this TV drama was a catalyst for a broader self-examination of German society. The older generation, which had been prone to avoid any discussion of their behavior during the Nazi era, could no longer remain silent.

At the opposite end of the spectrum is Oliver Stone’s 1991 film JFK. This is not historical fiction but pure fiction masquerading as history, buttressed by skillful cinematic touches to give it the feel of something akin to a documentary. Coming away from Stone’s film, the uninformed viewer is left with the impression that Vice President Lyndon Johnson, along with a cabal of other sinister figures, masterminded Kennedy’s assassination so that Johnson could take Kennedy’s place—although there’s not a shred of evidence to support such a conspiracy theory.

Stone did not present his film as an alternate history but as the true story. Someone I met after a screening tried to argue that, even if unsubstantiated, it presented “a larger truth.” You can’t get more intellectually dishonest than that.

The Crown, by comparison, is largely a product of solid historical research, chronicling real events while embellishing some of them and inventing the intimate conversations between Queen Elizabeth and Prince Phillip that are impossible to check. It works so well because the imagined parts—even a fictional character like Churchill’s favorite young secretary Venetia Scott during London’s deadly smog of 1952—fit convincingly into the narrative.

But in the case of The Darkest Hour, the highly acclaimed film about Churchill’s handling of the fall of France and the defense of his country in 1940, the imaginary distorts rather than illuminates the basic story. There’s the scene of Churchill taking a ride in the Tube with the passengers urging him to fight Hitler. It’s not so much the fact that Churchill never set foot in the Tube during this period that’s bothersome; it’s that it implies that he needed this kind of pep talk from ordinary people to steel his resolve. Or that he needed a similar pep talk from King George, when in reality it was Churchill who skillfully brought the monarch, who had earlier supported his predecessor Neville Chamberlain’s policy of appeasement, over to his side.

“ For many writers, the attraction of historical fiction is that it allows them to spin more than a good yarn: they can convey the atmosphere of an era. ”

As a result, Gary Oldman’s skillful portrayal of an initially vacillating, at times doddering Churchill misses the mark. By contrast, Steven Spielberg’s The Post strikes only an occasional false note. For example, there are the admiring women who line up to glimpse Katharine Graham, The Washington Post publisher, as she emerges from the Supreme Court after it issued its verdict in the Pentagon papers case in 1971. In fact, Graham left the hearing almost unnoticed since this was long before she became a feminist icon. But as my former Post company colleagues can attest, Meryl Streep turns in an uncannily convincing performance as Graham, capturing her personality and mannerisms as well as her growing resolve in the midst of her newspaper’s first defining moment.

Not all movies and novels should be judged by their broad historical accuracy, so long as they are not attempting to fool viewers and readers into believing they are presenting an accurate version of events. Quentin Tarantino’s huge hit Inglourious Basterds tells the story of Jewish G.I.s and a French Jewish woman assassinating Hitler and other top Nazi leaders in occupied France. Audiences loved it, knowing full well that this was pure fantasy. (In the interest of full disclosure, my novel Last Stop Vienna imagined an earlier alternate ending for Hitler, too.) Robert Harris’s Fatherland, published in 1992, is a masterful novel set in Berlin after Germany wins World War II.

But such ventures into counterfactual history are more the exceptions than the rule. Harris, for instance, has since produced a string of historical novels—among them, Conclave, Pompeii and Enigma—that have established the British writer as the current champion of this genre. His latest offering, Munich, displays his talent for taking a well-known event like the 1938 Munich conference, placing his fictional characters in real settings with the main protagonists like Chamberlain and Hitler, and producing a compelling read.

The key ingredient of Harris’ success is his palpable fascination and detailed knowledge of the historical events and settings of all his books. In Munich, the plot itself—the effort by a German foreign ministry official to alert his former Oxford classmate, a member of the British delegation to Munich, to Hitler’s allegedly secret plans for further conquest—is hardly startling; any reader of Mein Kampf would be familiar with those plans already. But Harris infuses his story with insights into the doomed British and French efforts to reason with Hitler, which was “like watching an unarmed passerby trying to persuade a madman to hand over his gun.” And with the anguish of his main German character as he tries to persuade the British to stand up to Hitler, explaining how his country is now in the grips of “the power of unreason.”

For many writers, the attraction of historical fiction is that it allows them to spin more than a good yarn: they can convey the atmosphere of an era. Alan Furst, the American author of spy novels like The Polish Officer, Dark Voyage, and A Hero of France, takes the prize for vividly conjuring up the shadowy atmosphere of prewar and wartime Europe.

The other attraction of historical fiction is the opportunity it offers writers to explore the psyches and choices of their characters. William Shirer, the acclaimed journalist and author of The Rise and Fall of the Third Reich, wrote The Traitor, a largely forgotten novel about an American expat who becomes a propagandist for Nazi Germany. Shirer’s nonfiction is far more powerful, but his novel demonstrates his fascination with those Americans he encountered in Berlin who had gone to the other side—but whose motives and background were often shrouded in mystery.

Simon Sebag Montefiore, the British author of hefty nonfiction works such as Stalin: The Court of the Red Tsar and The Romanovs: 1613-1918, has been more successful pursuing a parallel track as a novelist. His last installment of what he calls his Moscow trilogy, Red Sky at Noon, tells the story of Benya Golden, a Russian Jew who emerges from the Gulag to join a penal battalion of Cossacks during the battle for Stalingrad in 1942. His near-miraculous escapes require a suspension of disbelief at times. But the horrific conditions and desperation of those who were thrown into these penal battalions and sent on suicide missions is based on the historical record that Montefiore has expertly chronicled in his nonfiction.

If there’s any doubt on that score, Montefiore includes an author’s note about “Fiction and Fact,” sorting out the two in his novel. That’s not a requirement for a historical novel or film but it certainly adds to its credibility. And a measure of credibility is, ultimately, what good historical fiction is all about.