Anthony Rapp, a cast member in “Star Trek: Discovery,” at the premiere of the new television series in Los Angeles in September. (Chris Pizzello/Invision/AP)

In the fifth episode of the new “Star Trek” television series, smuggler and trickster Harry Mudd unleashes a stream of resentment against Gabriel Lorca, captain of the USS Discovery. “Have you ever bothered to look out of your spaceship down at the little guys below?” he rants. “There are a lot more of us down there than there are you up here. And we’re sick and tired of getting caught in your crossfire.”

“Star Trek: Discovery,” set a decade before the adventures of Capt. Kirk and Mr. Spock, is a dark and disconcerting take on the franchise. Mudd’s populist anger is just one departure from the traditional interplanetary idealism of the “Star Trek” universe. In this fictional future, primal forces are warring against the technocratic Federation. Back in our world, nationalist populism is challenging the liberal international vision. “Star Trek” is once again a mirror on our politics and a lens into our possible future.

Once upon a time, ‘Star Trek’ was optimistic about the postwar world order

Fifty years ago on our television screens, Capt. James T. Kirk chased Mudd through space much as the police pursue an erratic driver. Kirk charged Mudd with violations of the rules-based order, including “galaxy travel without a flight plan . . . failure to answer a starship’s signal . . . effecting a menace to navigation.” The USS Enterprise’s mission was to explore space and add newly discovered territory to the Federation’s zone of good governance. The five-year plan was to explore strange new worlds, establish and regulate commercial relationships and spread liberal values.

The original series of the 1960s, and the “Next Generation” sequel of the 1980s, dramatized creator Gene Roddenberry’s end of history theories, in which our better angels would triumph. It showed a future in which globalization became, almost literally, universal. By the time of “Star Trek: The Next Generation,” this project seemed close to completion. In “The Next Generation,” set 100 years after the original series, the Federation had integrated most of its enemies into its zone of peace and prosperity. Families lived aboard the supersized starship. The episodes were seminars in mediating disputes among species under the Federation’s protective umbrella.

Not any more, as you will see from the spoilers below  

By contrast, “Star Trek: Discovery” is warning us that things may get worse before they get better. The Harry Mudd of the 1960s series was a whimsical rogue; this new Mudd is furious. Armed with a time travel device, he engineers a recurring Groundhog Day massacre of everyone onboard the USS Discovery. And it’s not just the bad guys who are more violent this time. The protagonist, Michael Burnham, commits mutiny and assaults her commanding officer in the first episode.

The show tells us that hundreds of years in the future, history will still have plenty of twists and turns left. The Federation is fighting a devastating war with the Klingons, an expansionist warrior race that was the original series’ analog to the Soviet Union. In this new iteration, the Klingons are blood-and-soil isolationists. They decry the hypocrisy of a Federation that says “we come in peace.” For the Klingons, the unspoken next line is “so long as you remake yourselves in our image.”

The Vulcans, Earth’s essential allies, resent the interbreeding with humans that produced Mr. Spock and, in this new series, his adopted sister, Burnham. They are less positive-sum rationalists than purist ethno-nationalists. Capt. Lorca himself is an antihero. Faced with the capture of his previous ship, he blew it up as he escaped, killing the crew trapped on board. He imprisons and tortures a member of an alien species, using it to power the ship’s engines. Later, his starship encounters a sickened space whale. Lorca tries to navigate around it; it’s not his problem. He seems to relish the chance to cut some moral corners in the name of wartime expediency.

Sometimes by accident, more often by design, the various “Star Treks” have reflected the politics of their eras. The franchise has often held out the hope of a better future. Not this time. “Discovery” is a stark warning about where we may be headed. The triumph of the good is not inevitable. We may be boldly going where our species has so often gone in the past: in fear, toward violence and dissolution.

Stephen Benedict Dyson is an associate professor of political science at the University of Connecticut and author of  “Otherworldly Politics: The International Relations of ‘Star Trek,’ ‘Game of Thrones,’ and ‘Battlestar Galactica.’ ” He is completing a book about televised political fiction.