Hal Brands writes in Foreign Affairs about a key challenge for American foreign policy.

U.S. President Joe Biden took office pledging to wage a fateful contest between democracy and autocracy. After Russia invaded Ukraine, he summoned like-minded nations to a struggle “between liberty and repression, between a rules-based order and one governed by brute force.” Biden’s team has indeed made big moves in its contest with China and Russia, strengthening solidarity among advanced democracies that want to protect freedom by keeping powerful tyrannies in check. But even before the war between Hamas and Israel presented its own thicket of problems, an administration that has emphasized the ideological nature of great-power rivalry was finding itself ensnared by a morally ambiguous world.

In Asia, Biden has bent over backward to woo a backsliding India, a communist Vietnam, and other not so liberal states. In Europe, wartime exigencies have muted concerns about creeping authoritarianism on NATO’s eastern and southern fronts. In the Middle East, Biden has concluded that Arab dictators are not pariahs but vital partners. Defending a threatened order involves reviving the free-world community. It also, apparently, entails buttressing an arc of imperfect democracies and outright autocracies across much of the globe.

Biden’s conflicted strategy reflects the realities of contemporary coalition building: when it comes to countering China and Russia, democratic alliances go only so far. Biden’s approach also reflects a deeper, more enduring tension. American interests are inextricably tied to American values: the United States typically enters into great-power competition because it fears mighty autocracies will otherwise make the world unsafe for democracy. But an age of conflict invariably becomes, to some degree, an age of amorality because the only way to protect a world fit for freedom is to court impure partners and engage in impure acts.

Expect more of this. If the stakes of today’s rivalries are as high as Biden claims, Washington will engage in some breathtakingly cynical behavior to keep its foes contained.