Editor’s Note: Frida Ghitis, a former CNN producer and correspondent, is a world affairs columnist. She is a frequent opinion contributor to CNN, a contributing columnist to the Washington Post and a columnist for World Politics Review. Follow her on Twitter @fridaghitis. The opinions expressed in this commentary are those of the author. Read more opinion on CNN.

CNN  — 

When President Donald Trump tweeted his objection to the sentencing recommendation for his friend Roger Stone, and Attorney General William Barr then quickly reversed the recommendation, they were following along a well-trod path across history: the systematic crushing of the independence of the judiciary.

We have seen this movie before. It doesn’t end well.

An independent judiciary is an indispensable ingredient in the rule of law, and without rule of law, there is no justice. Without rule of law it’s all but impossible to preserve a functioning democracy, let alone a well-functioning government.

We have seen this through even recent history: as would-be autocrats have torn multiple countries away from their democratic moorings, a primary target has been the judiciary.

That has been the course charted by malign populists across the political spectrum, on the left and on the right. We saw it in Hugo Chavez’s Venezuela and in Vladimir Putin’s Russia–and too many others.

Four prosecutors who successfully led Roger Stone to conviction on charges including lying to Congress and tampering with a witness had recommended up to nine years in prison for the longtime Trump confidant. Indeed, Stone’s actions aimed to protect Trump from the Mueller investigation. Trump expressed his displeasure at the recommendation, and in an unprecedented move, Barr promptly overruled his own team.

Now Barr is throwing up his hands, saying Trump is making it impossible for him to do his job with his running commentary on Twitter. But Americans have already seen how Barr is putting his department to work for the president. Barr acknowledged setting up a special channel at the Justice Department for Rudy Giuliani to transmit the dirt he digs up on Trump’s political opponents, for example. Barr’s complaint now may have more to do with Trump’s public airing of his interference into the rule of law.

Claims that the Justice Department’s decision had nothing to do with Trump’s wishes takes Americans for fools. The four prosecutors immediately resigned from the case.

If there’s any solace to be found, it is in the vehemence of the backlash. Perhaps there’s a chance that Americans and their institutions can still push back against this country’s drift toward authoritarianism under Trump.

After all, look at the stakes; look at what other strongmen have wrought:

When Putin came to power in Russia, the country was steadily building a democracy. The non-partisan Freedom House rated it “Partly Free.” Two decades later, the organization ranks it “Not Free,” noting the country’s “subservient judiciary,” which allows the Kremlin to “manipulate elections and suppress genuine dissent.” That also helps explain the “rampant corruption” that now pervades Russia.

Like other autocrats, Putin has turned the judiciary and law enforcement into a tool for maximizing his power and grinding the opposition. That became evident early on, when in 2003 he decided to launch a prosecution of Mikhail Khodorkovsky, once Russia’s wealthiest man, after Khodorkovsky dared to break the rule that oligarchs get to make a lot of money as long as they don’t challenge Putin. Khodorkovsky spent a decade in a Siberian prison.

Other Putin critics have been in and out of jail. Those that perhaps posed a greater threat have ended up dead in mysterious circumstances.

Another fledgling democracy, Turkey, came under the spell of the charismatic Recep Tayyip Erdogan, now in power for 17 years. He has also dismantled democratic institutions, most notably an independent judiciary. Erdogan, who vastly expanded the powers of what used to be a ceremonial presidency, has fired thousands of judges and mobilized pliable prosecutors against real and perceived foes. Omar Faruk Eminagaoglu, a former judge and prosecutor, has faced a barrage of charges that accuse him of insulting the president through his comments on social media.

Erdogan publicly claims the judiciary is independent, but as his sway increased in the aftermath of a 2016 attempted coup, he pushed a referendum expanding his powers. Among other things, it gave him control of the panel that appoints, removes and disciplines judges. Justice is his.

Another autocrat that reminds many of Trump is Philippines President Rodrigo Duterte. He, too, has weaponized the judiciary. When the head of the Supreme Court, Maria Lourdes Sereno, dared to criticize Duterte’s brutal war on drugs, the Supreme Court removed her from her post. An opposition politician, Gio Tingson, said the move “destroyed the constitutional process of impeachment and system of checks and balances.”

Duterte had his most prominent critic in Congress jailed and has launched a relentless campaign of harassment against the journalist Maria Ressa (a former CNN colleague of mine) who has been repeatedly arrested.

In Eastern Europe, where democratic backsliding continues, assaults on the independence of the judiciary have become common.

But it’s not only far-right leaders taking this path. Snatching the reins from independent judges and prosecutors is the go-to maneuver for anyone who wants to rule unimpeded by the annoyances of democratic checks.

Venezuela’s Hugo Chavez, the socialist predecessor to Nicolas Maduro, took apart constraints on his rule by destroying judicial independence. His dismantling of the rule of law was one more step in the country’s stunning social and economic collapse. This is because without rule of law, corruption inevitably explodes across the economy. And when corruption is prevalent, the economy becomes inefficient, and investors hesitate, ultimately causing fewer jobs to be created.

Chavez had judges arrested and – in a move reminiscent of Trump’s tweets – went on television with “suggestions” of how long a prison sentence they deserved. Judges became scared of the president. Before long, judges and prosecutors didn’t even need to wait for his instructions; they knew what the president wanted. Now prosecutors in the US say they worry about pressure from Trump.

Stay up to date on the latest opinion, analysis and conversations through social media. Join us at Facebook/CNNOpinion and follow us @CNNOpinion on Twitter. We welcome your ideas and comments.

Barr, and other Trump toadies now populating the government, know exactly what the President wants. They hardly need to hear from him.

Is the United States doomed to follow the steps that led to the near-complete destruction of democracy in countries like Russia, Turkey or Venezuela? That is not a foregone conclusion. American democracy has deeper roots, and its institutions are built on more solid ground.

But it is by now obvious that in the aftermath of his impeachment acquittal, Trump is even more emboldened. He’s calling for an investigation of Lt. Col Alexander Vindman, who testified in the impeachment inquiry, and even going after jurors in the Stone case. Republicans seem more afraid of him. There’s no guarantee that America’s democratic institutions can hold for another five (yes, five) years.