The American founders believed that prolonged rivalry and conflict abroad would eventually degrade the country’s democracy at home. Today, many of the strongest warnings against a new cold war with China have a similar ring.

The New York Times, the Economist and pundits such as Fareed Zakaria have all warned of a “new Red Scare.” The implication is that geopolitical dangers could again cause a narrowing of political expression, a feverish search for internal enemies and a corrosion of the liberties U.S. foreign policy is supposed to defend.

That fear is reasonable: The Cold War showed that great democracies are not immune to committing self-harm in the name of security. But the history of that struggle also teaches a more hopeful lesson — that competition can create virtuous pressures for a nation to become a better version of itself.