In case anyone was in doubt, the extraordinarily painful events of the past few weeks should remind the world that America is a land of contradictions. In the words of Abraham Lincoln, America was a nation "conceived in liberty, and dedicated to the proposition that all men are created equal". From the beginning, Americans have always seen their country as an idea as much as a place. This idea had universal aspirations and demanded that even as Americans struggled to expand liberty at home, they would also promote it abroad. Over the past two and a half centuries, America has inspired others in their quest for freedom and human dignity, and it has often supported nations and individuals around the world seeking democracy and human rights.

But from the very outset, there has been another story, equally powerful in shaping the course of American history - and it is one founded in oppression. "To drag a man in fetters into the grand illuminated temple of liberty," Frederick Douglas proclaimed in 1852, "and call upon him to join you in joyous anthems, were inhuman mockery and sacrilegious irony." Predating the birth of the nation, slavery began in America in 1619, and became woven into the country's fabric. Its legacy shaped the development of America's politics, the nature of its economy, and the thrust of its foreign policy. And it cast an indelible stain on American society. In words that are acutely relevant today, Martin Luther King Jr. declared in 1967 that "we must face the hard fact that many Americans would like to have a nation which is a democracy for white Americans but simultaneously a dictatorship over black Americans".

As America confronts a world where authoritarian powers, led by Beijing and Moscow, have become more repressive at home and increasingly aggressive abroad, America is also in the midst of a deep, painful and necessary reckoning over the systemic racism that permeates its society, disfigures its institutions, and debases its ideals.

The light of liberty and the darkness of oppression are the twin stands of American history. As America confronts a world where authoritarian powers, led by Beijing and Moscow, have become more repressive at home and increasingly aggressive abroad, America is also in the midst of a deep, painful and necessary reckoning over the systemic racism that permeates its society, disfigures its institutions, and debases its ideals.

This past week has offered a stark reminder of the danger of addressing one without the other. Promoting democracy abroad without confronting glaring deficits at home exposes the United States to charges of hypocrisy. It marks the American model as one that is unattractive at best, and pernicious at worst. And it means that the country's power and influence will diminish as its internal problems consume its attention and resources.

But turning away from the world is just as problematic for the cause of liberty. Doing so would give a free pass to Xi Jinping, Vladimir Putin and other authoritarian leaders aspiring for totalitarian control. It would tilt the balance of power in Asia and Europe in Beijing and Moscow's favour, inviting further aggression. And it would abandon those fighting against oppression around the world and hoping for a strong champion in the United States.

During the Cold War, it was competition with an illiberal authoritarian regime that spurred American leadership to address systemic racial and economic inequalities at home. Harry Truman urged the passage of civil rights legislation on the ground that "if we wish to inspire the peoples of the world whose freedom is in jeopardy, if we wish to restore hope to those who have already lost their civil liberties, if we wish to fulfil the promise that is ours, we must correct the remaining imperfections in our practice of democracy." Both John F. Kennedy and Lyndon Johnson advocated for civil rights legislation at least partially on the grounds that failing to do so would deliver a propaganda victory to the Soviets. As the historian Melvyn P. Leffler has argued, America won the Cold War not because its system was inherently superior, but because democratic statesmen made conscious policy choices to ensure that their system offered a superior way of life.

The reality is that America does not have the luxury to choose whether it should address racial inequality at home, or call out and challenge illiberalism abroad. It must do both.

The challenge for America today is daunting, and it is compounded by a president who revels in deepening societal grievances, stirring up prejudices, and threatening to unleash America's military against its own citizens. But his is not the only voice - nor has it been the most compelling. Ordinary Americans of all races, military leaders, and state and local elected officials are now listening, speaking up, and committing to change.

The reality is that America does not have the luxury to choose whether it should address racial inequality at home, or call out and challenge illiberalism abroad. It must do both. America must address its contradictions head-on, reconciling its ideals with the painful lived experiences of millions of its citizens. Meanwhile America and its allies must continue to press the cause of liberty and democracy in the world, because these values must be defended against those who would subvert, undermine, and extinguish them.

America was founded upon more than just notions of universal freedom and democracy. It was also founded with the belief that because people were inherently flawed, the nation must constantly hold up a mirror - to itself and to the world. America's appeal has never been that it is a perfect democracy, but rather that it has the ability to struggle with its own failings and hold itself to a higher standard. That idea is under intense pressure today and the images and words flowing out of America this week are overwhelming and confronting. But they also serve as a stark reminder that in the face of injustice at home and oppression abroad, America's cause is the cause of the world - but only if that cause is one where the country strives to live up to its ideals and encourages others to do so as well.