That, of course, is the plot of “Servant of the People,” the television comedy that launched the real political career of its star actor, Volodymyr Zelensky. Having played the president on TV, Zelensky is now the real president. A few months into his term, he is enjoying a honeymoon many other leaders would envy: 71 percent of Ukrainians say they approve of the president’s performance so far, a very high percentage in a country that is often cynical about politics and politicians. What the voters seem to like, above all, is Zelensky’s language about ending corruption. This was the issue that brought the fictional president to power, and this is the issue that brought the real president to power, too.

The popular support could give Zelensky license to make some really fundamental changes. Since attaining independence, Ukraine, a nation that excels at creating civic institutions, has been much less successful in its attempts to create neutral, nonpartisan state institutions. The country’s long history of totalitarian and authoritarian rule means that the public is wary of the state and its civil servants; civil servants, in turn, are poorly paid, and thus easily bribed, which compounds this mistrust.

The faith that people have placed in Zelensky gives his team a real chance to change this atmosphere, and above all to create independent courts and an apolitical prosecution service that treats all citizens equally. Promising new appointments include a chief prosecutor who resigned from the country’s anti-corruption agency in 2017, disgusted by its failures, and a deputy prosecutor, Vitaly Kasko, who resigned from the prosecution service in 2016, disgusted by its failures, too. Last weekend, I heard Kasko, in office for only a few days, tell a large audience in Kiev that he hoped now to help create a genuinely independent prosecutor’s office, one whose activities would not be influenced by politics.

Despite this impressive team, not everybody believes that Zelensky will follow through. In the past, Zelensky has been closely connected with one of Ukraine’s wealthiest oligarchs, Ihor Kolomoisky, the owner of the television channel that broadcast the president’s comedy show. Kolomoisky also owned a bank that the previous government said was used to launder money and to illegally fund other businesses. To protect depositors, the government bailed it out, at vast expense, and nationalized it. Now Kolomoisky is back in the country, appearing in public, having his photograph taken with Zelensky — and talking about getting his bank back.

If this were still a television series, this moment would be the dramatic turning point. To put it rather crudely: Will Zelensky really break with the past? Is he really different from his predecessors? Will he destroy a judicial system that has allowed some people to get away with literal murder? Or will he stick by his former patron, keep the judicial system biased and political, and keep the oligarchs in power?

Enter President Trump.

In the world as it existed up until 2016, U.S. and European powers would be pushing Zelensky hard to make the right decisions. Certainly Ukraine’s foreign friends — among them the International Monetary Fund, several European governments and former vice president Joe Biden, who often represented the Obama administration in Ukraine — pushed the previous government hard to create institutions that would fight corruption, and not just talk about it. But the Western world since 2016 has been led by a new kind of American president, one who hopes to use Ukraine’s old habits of politicized justice for his own benefit.

Over the summer, the Trump White House held up promised military aid to Ukraine, for reasons that were left ambiguous. In Kiev, many believe the delay was caused by Trump’s demand that Zelensky’s government conduct a series of spurious, politicized investigations, designed both to smear Biden and to exonerate Paul Manafort, who was deeply involved with the most corrupt part of the Ukrainian political class for many years. In Washington, Congress has already launched an investigation of Trump’s policy toward Ukraine. Now it seems that a whistleblower inside the intelligence agencies was so alarmed by some of Trump’s dealings with Ukraine that he or she lodged a formal complaint.

Instead of pushing Ukraine to stick to the law, as any other U.S. president would have done in the past, Trump might have pushed Ukraine to manipulate the law for his benefit. Zelensky, a comedian entrusted with the transformation of his country away from its post-Soviet mentality, has been blocked by Trump, a reality television star who has brought a post-Soviet mentality into the White House, using public office for private gain, undermining legal institutions and even using government power to put pressure on business.

It’s the plot twist no one predicted. We thought that the Zelensky story was about Ukrainian corruption. But this is now a story about American corruption — or, perhaps, about the ongoing Ukrainianization of American politics. In the next episode, will a viral video rant propel an American reformer to power?