IN THE 2003 MOVIE, The Last Samurai, Tom Cruise plays a former U.S. Army captain named Nathan Algren, an alcoholic and mercenary who in the 1870s goes to Japan to work for the Emperor Meiji. The young emperor is facing a samurai rebellion, and Algren trains a ragtag bunch of farmers and peasants in modern warfare, including the use of rifles. When Algren is captured by the samurai, however, he is gradually converted to their ways and ends up fighting alongside the warriors in a losing battle against the Imperial Army he helped to create.

The movie was both a critical and popular success, and why not? It offers lots of exciting swordplay, exotic costumes and a fascinating piece of history that was probably unfamiliar to most Americans before the film was released. Indeed, it’s fair to say that many Americans have learned much of what they know about the westernization of Japan from watching films such as The Last Samurai.

That’s probably not a good thing, because the film is full of historical errors. Most notably, it was the French and Dutch, not Americans, who played the key role in Japan’s modernization in the late 19th century. The Algren character is loosely based on a French officer named Jules Brunet. What’s more, the movie conflates two decades of military history for the sake of simplicity and presents a highly romanticized view of the samurai warriors.

I know, I know. The Last Samurai is not a documentary, and people go to the movies to be entertained, not to be instructed in history. No argument there. But films such as The Last Samurai are increasingly used in the classroom as well, as adjuncts to textbooks and lectures. Educators believe that the vividness of film can be a valuable teaching tool, enlivening and reinforcing students’ memories for otherwise dry historical text. But is that a good thing if the facts are wrong? Are they doing more harm than good?

A team of psychologists has begun exploring these questions experimentally. Andrew Butler of Washington University in St. Louis and his colleagues decided to simulate a classroom where popular films are used as a teaching tool, to see if the practice improved or distorted students’ understanding. The Last Samurai was in fact one of the films they used in the experiment, along with Amadeus, Glory, Amistad and a few others. All the films contained both accurate and inaccurate information about the historical incidents they depicted.

The students watched the film clips either before or after they read an accurate version of the historical events. So with The Last Samurai, for example, they read a version that accurately identified the hero as French, not American, and was faithful to the actual timeline of Japanese history. In addition, some of the students received a general warning about the inaccuracy of popular historical films, whereas others got very specific warnings—for instance, about changing the hero’s nationality. The idea was to see which teaching method led to the most accurate comprehension of the events: reading or watching a movie, or both, with or without the teacher’s commentary.

When the psychologists tested all the students a week later, the verdict for classroom movies was one thumb up, one thumb down. Watching the films did clearly help the students learn more, but only when the information was the same in both text and film. Apparently the vividness of the film (and simply having a second version of the same facts) did help the students create stronger memories of the material. But when the information in the film and the reading were contradictory—that is, when the film was inaccurate—the students were more likely to recall the film’s distorted version. What’s more, they were very confident in their memories, even though they were wrong. This happened even when the students were warned that filmmakers often play fast and loose with the facts.

So should films be banned from the classroom? Not necessarily, and here’s why. As the psychologists reported in September in the journal Psychological Science, a good teacher can trump a movie’s shortcomings. They found that when teachers gave the very detailed warnings about inaccuracies in the film version, the students got it. But those warnings had to be extremely precise, something such as: “Pay attention when you watch the film, and you’ll see that the filmmaker has changed the nationality of the hero from French to American, which is not the way it was.” With such warnings, the students apparently “tagged” the information as false in their memories—and remembered the accurate version when quizzed later on.

In this sense, a movie’s distorted version of history can be used as a teachable moment. Students learn the truth by identifying the mistakes and labeling them, so their takeaway learning is: the film says this, but in fact it’s that. Not a bad way to learn, assuming the classroom teacher knows enough to point out what’s this and that.