Since the collapse of the Berlin Wall, the United States has been the leader of the free world economically, militarily, but also -- as communism and fascism fell by the wayside -- as an idea.

They went too far in Iraq in 2003 , got too greedy before 2008, and let Syria down in 2013. But still, the US' obsession with painstakingly transparent self-analysis, allocation of blame and rooting out failure, got it back on top. However much you hate it, the idea seemed to justify its existence.

But this has been a difficult month. Well, a difficult year. Actually, scratch that too: everything since November 2016 has been discombobulating. I recall watching American expats, Europeans, Lebanese aghast in Beirut when Donald Trump won. It seemed to them like the wheels were coming off civilization. But surely, they could not forever, as the idea of the United States was designed to be tamper-proof?

Yet this is what the American people wanted -- the electoral college at least. Trump's rise reflected what Europe was already doing to itself: a reaction to rampant globalization, to an era of migration and economic freedoms no generation had seen before. But America was supposed to know better -- to lead us forward, not backward, to know the way.

Winston Churchill said you could always count on the Americans to do the right thing once they had tried everything else. Now, it's not clear who would know what the right thing is when it happens. Twitter, other social networks and websites mean it would be under assault by automated bots, the moment it put its head above the parapet.

When it comes to racism it's not just America, it's everywhere. Europe has been having its own ugly dance with it. Brexit is a form of xenophobia masked behind dislike at European trade regulations few voters know much about. And it was championed by a man who once said women in full-face veils looked like letter boxes. He is now Britain's prime minister. Germany has the Alternative for Deutschland. Italy has Matteo Salvini.

But America has taken it a step further. Burning lanterns, protestors being run over with cars, dog-whistles in mainstream politics. It is strange to live in a time when the then prime minister of the UK, Theresa May, had to publicly admonish the US president for racist comments, like President Trump's tweet that four congresswomen should "go back" where they came from. And to have the Chancellor of Germany, Angela Merkel, stand in "solidarity" with those targeted women.

We watch the downward spiral helpless, trying not to be dragged in. America's ugly obsession with guns and mass shootings blended this month predictably with the far extremes of anti-immigrant sentiment. But the rest of the world is used to American intransigence after killings like that in El Paso -- to seeing Americans bafflingly discuss cracking down on websites and mental health issues, and not the glaringly obvious problem of battlefield weapons (with magazines used in Dayton unlike anything I've ever seen in a warzone) being available to teenagers.

It is extremely hard to understand the American obsession with the gun, unless you are an American obsessed with the gun. Those Americans who believe in their right to bear arms look in revulsion at foreigners who think a person's right to safety is more important. The outside world just doesn't get it. And even places like Serbia -- just behind the US and Yemen in terms of legal gun ownership with a whopping 39 guns per hundred people (the US has 120) -- manage to have very low murder rates. 1.39 murders per hundred thousand people compared to the US' 5.35 in 2016. America seems a violent and angry place , and it didn't even have a civil war just over 20 years ago.

Japan just this week warned its tourists going to the US that it is a "gun society" where "gunfire incidents could occur anywhere." In Japan, you have an almost 0% chance of being murdered, by the way, and need to pass a long list of tests to own a firearm, including being 95% accurate at target practice. Japanese people are much, much safer with fewer guns. Even Serbian people are safer with not quite as many guns. New Zealand Prime Minister Jacinda Ardern summed up in May how many feel when they look on aghast and fatigued at another mass shooting in an American mall, "to be honest I do not understand the United States," she said.

Part of that violence feeds the American myth the world loves through Hollywood. The lone hero always vanquishes his persecutor with a 45. But compassion is also vital. The intense cruelty of US Customs and Border Protection facilities, separating children and parents, and of Immigration and Customs Enforcement raids, all fall foul of the rosy-eyed view outsiders have of America as a place where anyone can come and make it. The huddled masses were always the point of the United States, but now they seem to have become the enemy within.

The cruelty of how the US persecutes those who have broken its laws is something many Europeans marvel at. But we tend to forgive the American cruelty towards failure and sin. It's part of their winner-only culture, of the hope that eventually they will realize who was wrong and who was lazy and who had the better idea. That the meritocracy will resume its normal service shortly.

But with Trump it is different. His genius for retail politics isn't bound by truth or -- it seems -- decency. It feels like the American idea has been hacked. We don't know if it ends, ever, or whether, as Michael Wolff wrote, the biggest problem America will have now is getting back to politics being boring.

What comes next? Does it lead the free world again, or allow China's alien authoritarianism to fill the vacuum? Has America peaked? Will it eventually do the right thing, and who will be left to know when it does?