TOKYO — Amid the global outrage at the storming of the U.S. Capitol building by angry supporters of President Donald Trump was a persistent strain of glee from those who have long resented the perceived American tendency to chastise other countries for less-than-perfect adherence to democratic ideals.

The teargas and bullets inside the Capitol, a globally recognized structure that stands at the center of America’s idea of democracy, are more usually associated with countries where popular uprisings topple a hated dictator. The Arab Spring, for instance.

This time, however, it was an attempt by Americans to stop a peaceful transition of power to President-elect Joe Biden after a democratic election in a country that many around the world have looked at as a model for democratic governance.

“We must call this out for what it is: a deliberate assault on Democracy by a sitting President & his supporters, attempting to overturn a free & fair election! The world is watching! " Irish Foreign and Defense Minister Simon Coveney said on Twitter, representing a tone of outrage that many world leaders took.

Images from violence in D.C as protestors and supporters of President Donald Trump and his false election fraud claims storm the Capitol in protest of the Electoral College certifying President-elect Joe Biden's victory.

Some global observers, though, seemed to be reveling in the burst of violence that marked the closing days of a presidency that has divided opinion abroad almost as strongly as it has in America.

In China, which has had constant friction with the Trump administration over trade, military and political issues, people were scathing in their criticism of Trump and his supporters, citing both his failure to control the coronavirus pandemic and the mob action in Washington.

Communist-ruled China has long accused the U.S. of hypocrisy in its efforts to promote democracy and advocate for human rights overseas.

The Communist Youth League ran a photo montage of the violence at the Capitol on its Twitter-like Weibo microblog with the caption: “On the sixth, the U.S. Congress, a most beautiful site to behold.” That appeared to mock House Speaker Nancy Pelosi for her June 2019 comments in praise of sometimes-violent antigovernment protests in Hong Kong.

“The U.S. is not as safe as China, right? I think Trump is a self-righteous and selfish person,” said financial adviser Yang Ming.

President Trump urges mob storming the Capitol to ‘go home’

Some watching from abroad held Trump responsible for the chaos, and there was a widespread condemnation that seemed nurtured by the U.S. president’s often antagonistic relationship with countries around the world. That was especially true by those who have been at the sharp end of American military muscle and punitive sanctions.

Iran, another country that faces routine U.S. criticism over violations of human rights and democratic values, jumped on the insurrection as proof of American hypocrisy.

The semiofficial Fars news agency called the United States a “fragmented democracy,” while Iran’s pro-government Twitter accounts gloated, circulating photos of the mobs with hashtags that included #DownfalloftheUS.

The violence at the U.S. Capitol tarnishes the American insistence that it is a bastion of democracy for countries that have only in recent decades, in some cases, given up autocratic or military-controlled forms of government.

“The beauty of democracy?” with a shrug emoji was the reaction tweeted by Bashir Ahmad, a personal assistant to the president of Nigeria, which has seen several coups since independence — including one led decades ago by President Muhammadu Buhari, who most recently entered the office via a vote.

Some legislatures in Asia — South Korea and Taiwan, for instance — have at times been marred with brawls and screaming, but democracies throughout the region are normally staid versions of European and American lawmaking models.

“This is shocking. I hope this will serve as chance for the Americans to review their democracy,” said Na HyunPil at the Korean House for International Solidarity, a Seoul-based NGO. “Trump is entirely responsible for this incident. After his four-year rule, the Americans find it difficult to tell other countries that their country is a good model for democracy.”

U.S. politics have long been beset by fringe conspiracy theories and grievances, according to Wesley Widmaier, a professor of international relations at Australian National University.

“What makes the past four years different is that these views have been espoused by the president of the United States — and we can trace a direct line from Trump’s incendiary rhetoric and outright lies about the 2020 election to the siege of the U.S. Capitol,” he said.

Several countries, both allies and antagonists of America, issued travel warnings to their citizens.

Australians were urged to avoid U.S. protests following what Prime Minister Scott Morrison described as “rather disturbing scenes” in the United States.

Malcolm Turnbull, who was Australian prime minister when Trump came to office and was replaced by Morrison in 2018, was much stronger in his condemnation, describing Trump as a narcissistic bully who is only interested in his own power.

“I was appalled,” Turnbull told Australian Broadcasting Corp. “Donald Trump has done more damage to America during his four years, both internally, domestically, and in terms of its international standing, than any of its adversaries could have imagined possible.”

Other friendly countries were similarly shocked at what they described as an attack on American democracy, though some said they believed U.S. democratic institutions would withstand the turmoil.

“Disgraceful scenes in US Congress,” tweeted Prime Minister Boris Johnson of Britain, a staunch U.S. ally for generations. “The United States stands for democracy around the world and it is now vital that there should be a peaceful and orderly transfer of power.”

“What is happening is wrong,” New Zealand Prime Minister Jacinda Ardern said in a statement. “Democracy — the right of people to exercise a vote, have their voice heard and then have that decision upheld peacefully — should never be undone by a mob.”

The prime minister of the world’s largest democracy, India’s Narendra Modi, said on Twitter: “Distressed to see news about rioting and violence in Washington DC. Orderly and peaceful transfer of power must continue. The democratic process cannot be allowed to be subverted through unlawful protests.”

Venezuela, which is under U.S. sanctions, said the events in Washington show that the U.S. “is suffering what it has generated in other countries with its politics of aggression.”

Venezuelan President Nicolás Maduro has survived U.S.-backed opposition efforts to oust him despite accusations of human rights abuses, civil unrest and a humanitarian crisis that has forced millions to flee the oil-rich country.

“This is insurrection. Nothing less. In Washington,” tweeted Carl Bildt, a former prime minister of Sweden.