Parit “Penguin” Chiwarak is a 22-year-old Thai university student who has been in prison for nearly two months and is currently on hunger strike. Last week, he was brought into a Bangkok court in a wheelchair, attached to a saline drip. If convicted of all charges, he faces a maximum sentence of up to 300 years.

His “crimes” stem from a peaceful pro-democracy protest movement aimed at creating genuine democracy in Thailand — a country currently ruled by a former general and a king. A mass trial of dozens of other student activists is also underway. Some of the most outspoken dissidents have disappeared — only to turn up dead, their bodies filled with concrete.

This is happening in a country that is one of the United States’ oldest and closest allies in Asia. And it’s just one example of many that showcase the challenges underlying President Biden’s bid to restore the United States’ standing as a beacon for global democracy.

For the past four years, President Donald Trump trampled on President Ronald Reagan’s claim that the United States should be seen as a “shining city upon a hill.” Democratic reformers in places like Thailand saw only darkness as they looked to the United States and saw Trump showering praise on dictators. The Jan. 6 insurrection also underlined the urgency of restoring functioning democracy in the United States itself.

Of course, the United States had a checkered record on democracy promotion even before Trump. Since World War II, the United States has used its power to advance the cause of democracy in countless countries. But there have also been times when the White House has helped sponsor coups that uprooted democratically elected leaders and replaced them with militaristic despots. Too often, Washington has eloquently championed democracy in speeches, while entrenching authoritarian allies through a more hard-nosed foreign policy. The distasteful mantra that “he may be a despot, but he’s our despot” applies to U.S. allies as diverse as Egypt, Uganda and, yes, Thailand.

The reasons for such authoritarian acceptance vary. Sometimes, the White House sends billions in aid and weapons to atrocious regimes, and in exchange they are supposed to play ball with U.S. counterterrorism operations (as in Uganda and Pakistan). In other cases it’s to ensure a favorable regional balance of power, or to maintain peace with another U.S. ally (as with Egypt’s recognition of Israel). But Washington also worries that any genuine pressure on friendly despots will only push them further into Beijing’s outstretched authoritarian arms. That’s one of the big worries with Thailand.

This is the central dilemma of U.S. democracy promotion. To truly stand up for democracy, Biden can’t afford to stand with dictators. But standing only with democratically elected leaders opens up quite a lot of the geopolitical chess board to China, which is eagerly seeking fresh pawns.

There is a solution. It’s possible to play geopolitical hardball while making the world more democratic. But it requires a fresh approach to democracy promotion that incorporates bipartisan long-term planning — a facet of U.S. foreign policy that is usually swept aside by the divisive short-termism used to win the next election.

Currently, countries like Thailand know that the State Department will occasionally issue scathing news releases, but will do little to punish the perpetrators in the regime. The United States’ allied despots mostly exist in an equilibrium. They can escape sanctions or a loss of weapons sales so long as they don’t take things too far. Poisoning critics could force Washington to take drastic action, so our dictator “friends” typically jail them instead. The same regimes hold elections but rig them. Counterfeit democracy reigns supreme. It’s what I call “the curse of low expectations.”

For Washington to change the rules of this game overnight would enable Beijing to easily pick off U.S. allies. The world’s 15-year slide toward authoritarianism would continue even faster.

The solution is for Biden and Congress to establish clear democratic benchmarks that countries must meet in the future to maintain their cozy relationship with the United States. The benchmarks should be specific, realistic and easily measurable. And there should be a mechanism to ensure the White House follows through on its own commitments.

Some measures could be abrupt. For example, Biden could establish a new policy that outlaws arms sales to any regime deemed by an independent, nongovernmental body of experts to be committing or facilitating war crimes.

Others will take time. It may be too much to ask an authoritarian ally to hold a legitimate, competitive election next year, but Biden could announce that they must do so before the end of his term or face reduced support from Washington. Similarly, Biden could phase in mandatory aid reductions or sanctions for governments that jail journalists or pro-democracy reformers on bogus charges. By gradually replacing hypocrisy and uncertainty with principled predictability, the United States could give awful regimes time to adapt without blasting them into China’s orbit.

Since World War II, the United States has advocated for democracy but hasn’t created a system of enforceable rules to deter or punish those who undermine it. Biden has a unique opportunity to fully align Washington’s rosy rhetoric with his foreign policy. He should seize it.

Read more: