LONDON—One of America’s leading documentary-makers set off on a project to examine the extraordinary life of Russian dissident Mikhail Khodorkovsky, and came away with the discomforting realization that President Trump is morphing into Vladimir Putin.

Alex Gibney’s Citizen K traces Putin’s evolution from political newbie to uncompromising autocrat whose ability to harness the power of TV allowed him to gain total control over a democratic state.

“It’s a cautionary tale,” Gibney told The Daily Beast. “There’s a lot that Putin and Trump share in common.”

One of the scenes in the documentary, which played at the London Film Festival, shows Putin watching as political advisers working for his predecessor Boris Yeltsin set up a fake office to impress television audiences.

“The lesson that Putin saw was: ‘Yeah. All right. I get it. Just lie. Use the media to lie,’” Gibney said. “I didn’t realize what a manufactured character he was. What a TV-manufactured character. He learned the lessons of television very well. He wasn’t a kind of born politician. The people around him, their ability to use TV to create this larger-than-life James Bond-like figure—that took over.”

Gibney sees obvious parallels in the way the reality-TV star Donald Trump used his media persona and endless TV appearances to win the presidency.

Even more alarmingly, there’s a clear parallel with the way Putin gaslights his entire nation.

The film includes a section on Putin telling obvious, outright lies about the attempted murder of Russian double agent Sergei Skripal in Salisbury, in southwest England. At the time, Putin backed the claims made on camera by two Russian intelligence agents, who were caught on CCTV heading to Salisbury on the day of the nerve-agent attack, saying they had flown to England simply to see the local cathedral and hoped to squeeze in a trip to Stonehenge.

“Talking about the whole Skripal attempted killings, it’s like Putin is saying: ‘We’re obviously lying. We don’t care that you know we’re lying. And by the way, we’re going to do it anyway. So go fuck yourselves.’ It’s like Trump saying, ‘There were more people at my inauguration than any other inauguration in history.’ You can look at the photographs. You don’t have to count the numbers. It’s a lie. But maybe more than a lie, it’s bullshit,” Gibney said.

“But you promote it, and it’s weirdly effective for the people who want to be behind you. It’s like you’re rooting for the balls, not for the brain.”

Of course, Putin used his mendacious television strategy to quash dissent and then to twist the spirit of Russia’s constitution to allow himself to retain power beyond the two-term limit. It’s hard to imagine him stepping down anytime soon without a fight.

“The classic example is Xi Jinping in China,” said Gibney. “He’s announced he’s gonna stay there. Will Putin do that? That will be the really interesting moment coming up. Will they find some mechanism to allow him to continue on in power?”

One of the most striking sections of the movie shows Gibney asking Khodorkovsky, once Russia’s richest man and now an exiled opposition figure, what he thought was Putin’s biggest nightmare. “He took me literally, which I found fascinating,” said Gibney.

Khodorkovsky, who founded the anti-Putin Open Russia organization, described a nightmare scenario in which the Kremlin phones suddenly stop working and no one answers Putin’s calls for assistance. He realizes this means the game is up and the gangsters are coming for him.

“One way to avoid that eventuality is to make sure that you never leave,” said Gibney. “If the gangsters think you’re leaving office, then you’re not useful to them anymore.”

Something similar must be rushing through Trump’s head as congressional inquiries, federal probes, and tax investigations mount.

“I think in the back of everyone’s minds they’re terrified of the idea that whether Trump loses in 2020 or whether he gets another four years, how can he imagine stepping down?” said Gibney.

“So many norms have been bent and twisted out of shape.”

“With Trump, there is a real fear that whenever he steps down—if he steps down—from his perspective, he’ll be prosecuted, he’ll be sent to jail. How do you forestall that eventuality? It’s the same thing with Putin—there are a lot of parallels in the film.”

Khodorkovsky, the “Citizen K” of the film’s title, was one of Russia’s most powerful oligarchs after successfully exploiting the post-Soviet privatization of the economy to rack up a personal fortune that Forbes estimated at around $15 billion.

The documentary shows how he fell out of favor with Putin after publicly experimenting with his own pro-democracy instincts. Eventually he would be arrested by Russian special forces and put on trial on trumped-up charges.

The trial resembles a Kafkaesque dystopia with ludicrous evidence presented by prosecutors who keep a straight face while Khodorkovsky smirks from behind bars at the craziness of it. “It’s an absurdist thing, and that by the way is an old theme that runs through Russian literature, the absurdity of power. When power says something is black and it’s clearly white,” said Gibney. “That’s why there’s so much time spent in the film on sculpting perception; it was clearly important for the state to have these trials to show that they’ve got a vigorous legal system.”

By the end of the trial, Khodokovsky is jailed and his business destroyed.

“For all sorts of practical and political reasons, Putin puts him in prison and, by the way, uses it as a demonstration of his power and his enduring political influence: ‘I brought to heel the oligarchs who so raped and pillaged this country.’ But then of course all around him he surrounds himself with oligarchs 2.0,” said Gibney. “That’s a classic Trumpian move. Even as he’s able to claim that he’s coming to power to drain the swamp, he’s filling it full of alligators—but they’re his alligators. Call it gangster capitalism or crony capitalism that they both represent.”