In 1903, Edison Films released Edwin S. Porter’s The Great Train Robbery, a 12-minute-long silent film that portrayed the robbing by bandits on horseback of a passenger train in the American West. Not only was it one of the first movies to tell a sequential story through the use of editing, but it was also the first genre film—and the genre it inaugurated, transplanted by Porter to the screen from novels and the stage, remains popular more than a century later. Indeed, one of the finest movies of 2018, Ethan and Joel Coen’s The Ballad of Buster Scruggs, was a Western, albeit one that was originally intended for online streaming via Netflix. The Old West is dead, but the Western still lives.

An important reason for the survival of the Western is that it has proved to be unusually adaptable to changing times and sensibilities. Younger filmmakers continue to find fresh ways to make their traditional plots reflect modern attitudes and concerns, and younger viewers continue to embrace the genre with the same relish as did their parents and grandparents.

One of the most significant examples of creative adaptation in the history of Western movies was the release of Sam Peckinpah’s The Wild Bunch, a 1969 film that appeared to break decisively with tradition both in its graphic portrayals of violence and in its setting and subject matter. It takes place not in the 19th century but in 1913, long after the closing of the American frontier, and it portrays a gang of aging outlaws who are attempting—without success—to grapple with the coming of modernity. In The Wild Bunch: Sam Peckinpah, a Revolution in Hollywood, and the Making of a Legendary Film, W.K. Stratton tells how it came to be made and how it fit into the “new wave” of Hollywood moviemaking that began two years earlier with Bonnie and Clyde and The Graduate.1 Stratton provides a casually written but carefully researched account of the making of one of the key films of its time. In so doing, he also helps to show how Westerns have managed to maintain their firm hold on the imaginations of American moviegoers.

Consistently popular with silent-era audiences, Westerns fell out of fashion at the major Hollywood studios following the 1929 release of Victor Fleming’s The Virginian, a film version of Owen Wister’s 1902 novel about a Wyoming cowboy that made Gary Cooper a star. Most of the other Westerns made between 1929 and 1939 were “B” pictures and serials ground out by “Poverty Row” studios such as Monogram and Republic for rural communities. An astounding number of Westerns was made in this way, most of which no longer survive.

In 1939, the major studios rediscovered the big-budget Western. Michael Curtiz’s Dodge City, Henry King’s Jesse James, John Ford’s Stagecoach, and Cecil B. DeMille’s Union Pacific starred such established and soon-to-be-famous actors as Errol Flynn, Henry Fonda, Tyrone Power, Randolph Scott, Barbara Stanwyck, and John Wayne, the last of whom was shortly to emerge as the quintessential Western star. Of these four hits, Stagecoach was uniquely influential (Orson Welles claimed to have watched it 40 times before making Citizen Kane). Every subsequent Western has either imitated the innovations of Stagecoach—sometimes directly, sometimes at second- and third-hand—or reacted against them.

Beyond its intrinsic quality, the chief significance of Stagecoach lay in the way in which it codified the nascent rules of the genre. The first of these is that every traditional Western is a hero’s tale, a morality play whose central character pits himself against evil and triumphs over it. He need not be made of virtue all compact: The Ringo Kid, played by Wayne in Stagecoach, is a roughneck who has just broken out of jail. But his commitment to virtue, while it may appear for a time to be in doubt, must be made fully manifest by film’s end.

In addition to the Ringo Kid, Ford filled Stagecoach with other stereotypical characters—a warm-hearted prostitute, a crooked banker, an alcoholic doctor—and placed them among the sandstone buttes of Monument Valley, there to enact the creation myth of frontier America, the belief that it was the “manifest destiny” of white Americans to settle and civilize the North American continent. From then until 1964, seven years before his death, Ford made Westerns in which he dramatized various aspects of manifest destiny, implicitly presenting it not as a myth but as historical fact. That the real truth was more complicated did not matter in the least to Ford, who believed that collective faith in national myths and the heroes who embody them was essential for America to flourish. He even went so far in My Darling Clementine (1946) as to fictionalize—and romanticize—such real-life men of the Old West as Wyatt Earp and Doc Holliday, many of whom were not nearly so heroic as Ford and his colleagues made them out to be. As another of his characters declared in The Man Who Shot Liberty Valance (1962), “when the legend becomes fact, sir, print the legend.”

The other historical myth dramatized in Stagecoach is the Code of the West—the unwritten rules of conduct for settlers of the territories that had not yet achieved statehood. Since the Old West was beyond the remit of written law, its inhabitants staved off chaos by hewing (at least on screen) to personal honor. Under the Code of the West, a man’s word is his bond, and a pledge of loyalty to a friend, colleague, or family member cannot be withdrawn unless it is negated by that person’s betrayal. Hence the self-imposed mission of the Ringo Kid, who has broken out of jail to pursue and kill the villains who murdered his brother and father. Even though the prostitute Dallas begs him not to put his life and their love at risk by doing so, the Code of the West leaves the Ringo Kid with no alternative: Were he to fail in his duty, he would be unworthy of Dallas’s love.

Stagecoach set the tone for Western filmmaking from 1939 to the end of World War II. They were portrayals of staunch heroism, which was both their strength—you always knew for whom to root—and their weakness. While some screen villains were not without a certain rough charm, there was no room for ambiguity among the larger-than-life protagonists who vanquished them. This one-sidedness would have caused the Western to exhaust itself as a genre had it not been for the same postwar sea change in audience attitudes that was also responsible for the simultaneous emergence of film noir. World War II veterans who saw combat were deeply unsettled by the experience, and many of them were thus drawn to films that took a darker, more realistic view of the world. Not coincidentally, most of the best Westerns to come out after the war—including Howard Hawks’s Red River (1948, starring Wayne and Montgomery Clift), Anthony Mann’s Winchester ’73 (1950, starring James Stewart), and Budd Boetticher’s Seven Men from Now (1956, starring Randolph Scott)—partook of this darker vision.

Even Ford, who was temperamentally disinclined to viewing the Old West in such a way, made two postwar Westerns, Fort Apache (1948) and The Searchers (1956), in which he consciously departed from the purely heroic vision of Stagecoach. In Fort Apache, the first panel in his “cavalry trilogy” of movies about the role played by the U.S. Army in the settlement of the Indian territories, Henry Fonda plays an arrogant regimental commander beset by deep-seated insecurity who makes the fatal mistake of underestimating the Apache warriors whom he has been ordered to conquer (as opposed to Wayne, his subordinate, who admires their fighting prowess). Bleaker still is The Searchers, in which Wayne plays a Confederate veteran who is obsessed to the point of monomania with the Comanches, whom he regards as so evil that he is willing to kill his niece rather than accept that she has slept with the Comanche warrior who kidnapped her years ago.

In part because of this stimulating new realism, most of the best Western films were made between 1945 and 1960, the heyday of what was known as the “adult Western.” By then, network TV had also come to be dominated by Westerns. No less than 27 weekly Western series aired in prime time during the 1959–60 TV season, and their smothering ubiquity inevitably led to a decline in the demand for big-screen Westerns. The only Western films to be widely noticed in that decade were the “spaghetti Westerns” shot in Europe by Sergio Leone and featuring an American TV star, Clint Eastwood of Rawhide, who in A Fistful of Dollars (1964) and its two sequels, For a Few Dollars More (1965) and The Good, the Bad and the Ugly (1966), played a nameless, all-but-amoral gunfighter, a full-fledged anti-hero of a sort unimaginable in the Westerns of the ’40s and ’50s.

Coarse as they were, Leone’s films spoke to the rising generation of American moviegoers, many of whom cared nothing for classic Western heroes. It was logical, then, that an American filmmaker of similar inclination would seek to appeal to those same moviegoers. Enter Sam Peckinpah (1925–1984), who had gotten his start working on TV Westerns but aspired to make feature films. In the wake of the success of Ride the High Country (1962), an adult Western starring Joel McCrea and Randolph Scott and directed by Peckinpah that revisited the themes of the traditional Western in a movingly elegiac way, Peckinpah short-circuited his career with Major Dundee (1965), after which his alcoholism caused him to be blacklisted by the major studios.

Not until 1969 was Peckinpah given another chance to direct a Western feature, one that would reflect the same uneasy climate of spiritual disaffection that animated Leone’s Westerns. Impeccably cast and directed with uncanny self-assurance, The Wild Bunch is the story of a gang of middle-aged gunfighters led by William Holden and Ernest Borgnine. Sensing that they are no longer equal to the challenge of keeping up with the times, they seek to pull off one last robbery that will let them retire in style. But they are relentlessly pursued by a posse of bounty hunters led by Robert Ryan, a former member of the Wild Bunch, and ultimately come to realize that they cannot prevail against the forces of modernity. In one last act of loyalty to another member of the gang who has been captured, Holden and his men deliberately walk into an ambush and are killed in a blaze of glory.

At first glance, The Wild Bunch, whose “protagonists” are all bandits, appears to be a group portrait of anti-heroism, just as its relentlessly gory, gorgeously photographed violence made it difficult for older viewers to see Holden (who was known for playing cynics) and his compatriots as anything other than vicious killers. But Peckinpah was in his contemporary way as much of a mythmaker as was John Ford. No less devout a believer in the Code of the West, he turned Pike Bishop, Holden’s character, into a man resolved to die the way he lives, with a crude yet comprehensible integrity. “We’re gonna stick together, just like it used to be,” he tells the other members of his gang. “When you side with a man, you stay with him. And if you can’t do that, you’re like some animal—you’re finished! We’re finished!” Because of this, we respond to the courage of Pike and his colleagues much as we would to that of more conventional Western heroes. As Peckinpah said: “The strange thing is that you feel a great sense of loss when these killers reach the end of the line.”

The Wild Bunch was followed not by films that continued the exploration of the Code in more graphic ways, but by the “revisionist Westerns” of the ’70s—heavy-handed and oddly anachronistic works like Arthur Penn’s Little Big Man (1970, starring Dustin Hoffman) and Robert Altman’s Buffalo Bill and the Indians, or Sitting Bull’s History Lesson (1976, starring Paul Newman). These were vulgar, unheroic inversions of the Western mythos, more about the Vietnam War and the cultural turmoil it fomented than about the past. Only Clint Eastwood, who started directing his own Western films in 1973, took that mythos at all seriously with a series of Westerns he directed himself, beginning with The Outlaw Josey Wales in 1975. He would reach the summit of his efforts with 1992’s Unforgiven, a revisionist film in which he played a rancher whose climactic embrace of the violence he had previously renounced marks one of the most disturbing evocations of the Code of the West ever filmed.

Among the most commercially successful Western films of the postwar era, Unforgiven is also one of only three Westerns to date to win a best-picture Oscar, no doubt because Eastwood played a troubled hero, one who despises himself for having resorted so frequently (if never easily) to violence in his youth. Similarly, Kevin Costner’s Dances with Wolves, released two years earlier, met with even greater success—it won seven Oscars, including the best-picture prize—by portraying its similarly troubled protagonist, played by Costner, as a guilt-ridden proto-liberal. In a radical departure from the traditional Western, in which American Indians were usually (if by no means always) portrayed as faceless monsters, Costner cast himself as a soldier who embraces the Indian way of life and refuses to participate in the U.S. Army’s attempt to subjugate the Sioux nation by force.

Not all of the Western-themed movies released in the ’80s and ’90s were revisionist Westerns—and not all of them were Westerns. From Jaws and Star Wars to today’s superhero movies, the heroic Western is now increasingly cloaked in other garbs. Indeed, the modern superhero genre has lasted long enough to spawn its own revisionist strain, exemplified by Christopher Nolan’s Dark Knight trilogy, in which Batman is portrayed not as a straightforward hero but as a sharply divided soul who is unsure of his own rectitude.

At the same time, though, the traditional Western still remains a viable genre for directors, screenwriters, and actors who dare to portray its protagonists as heroes, sometimes disillusioned but at bottom honorable. A turning point in its history came with the airing in 1989 of a hugely successful TV miniseries based on Lonesome Dove, Larry McMurtry’s Pulitzer-winning Western novel, starring Robert Duvall and Tommy Lee Jones, two superlative character actors who between them convincingly embodied the Western mythos. Since then, a modest number of traditional adult Westerns, including George P. Cosmatos’s Tombstone (1993, starring Kurt Russell and Val Kilmer), Costner’s Open Range (2003, starring Costner and Duvall), and Joel and Ethan Coen’s remake of True Grit (2010, starring Jeff Bridges in a role that was previously played by John Wayne in 1969), have continued to breathe life into the genre, as have such cable-TV and streaming series and free-standing films as Deadwood (2004–6), Hell on Wheels (2011–16), Godless (2017), and, most recently, The Ballad of Buster Scruggs.

Not all of these films and TV series feature old-fashioned heroes. Yet their success does suggest that a not-insignificant number of Americans continue to be engaged by the mythology of the Western, and few, even now, are wholly indifferent to its seductive appeal. Somehow we continue to dream of heroes and antiheroes who, like Pike Bishop and the Ringo Kid, steer by the twin lodestars of loyalty and honor—if only among thieves.

1 Bloomsbury, 352 pages