Chinese protesters throw bottles in an anti-Japan rally outside the Japanese embassy on Tuesday in Beijing.

Editor’s Note: Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review. A former CNN producer/correspondent, she is the author of “The End of Revolution: A Changing World in the Age of Live Television.” Follow her on Twitter: @FridaGColumns

Story highlights

Furious protests denouncing another nation are happening in China as well as the Mideast

Chinese protesters are taking to the streets, enraged by Japan's purchase of disputed islands

Ghitis: In Mideast and China, the powerful are manipulating protests

Ghitis: It's a risky business to use populist rage to gain power; the rage is not controllable

Kyoto, Japan CNN  — 

The newspapers and television news blaze with shocking images of crowds energized by fury, of buildings set aflame, of diplomatic missions under assault. It sounds very much like the Middle East, but it’s happening in China, and the target of the mob violence in scores of Chinese cities is Japan and the Japanese.

In both cases – in the Middle East and East Asia – the anger reflects a genuine, deeply felt indignation, but the protests have another powerful dimension. Political groups have turned religious or nationalist sensitivity into a weapon to further their objectives.

Politicians are riding the tiger of popular wrath, hoping to guide it, to control it, to make it attack and wound their enemies, so they can gain an advantage and further their agenda. It’s a perilous exercise. The tiger cannot be easily controlled.

Just as the Muslim world seemed to explode with violent rage against America over a blasphemous film, tens of thousands of Chinese protesters also boiled with barely contained ferocity against an affront by a foreign power.

Frida Ghitis

It started after the Japanese government purchased from a private owner a set of uninhabited islands claimed by both countries.

The obscure dispute over the cluster of rocky islets known as Senkaku in Japan and Diaoyu in China has simmered for many decades. Now, it has turned into one of the most serious confrontations since the two countries established relations in 1972, pitting the two biggest economies in Asia – No. 2 and No. 3 in the world – with crowds of Chinese demonstrators calling for China to “declare war” against Japan – and worse.

As protests spread to a hundred Chinese cities, one sign chillingly suggested, “We must exterminate the Japanese.”

Protesters threw bottles, rocks and eggs at the Japanese embassy, they smashed and burned Japanese businesses and vehicles and cars, and they generally overflowed with barely concealed hatred, the flames stoked even higher on the anniversary of the 1931 “Mukden incident” that started Japan’s invasion of China, the most sensitive spot in historical memory.

The nationalist pride is real, but there is much more to the mayhem.

Some of the same questions that have emerged from the anti-American violence in the Middle East are emerging in China. Is this all truly spontaneous? Is the timing purely coincidental? And, above all, who benefits?

In the Middle East, the repellent little film that triggered Muslim anger was posted on YouTube on July 1. Although it apparently wasn’t translated into Arabic until and aired on Egyptian TV around September 5,the surge of murderous attacks against U.S. diplomatic missions came, of all days, on September 11.

In China, the conflict is happening just as the ruling Communist Party prepares for the 18th Party Congress, when a pivotal power handover is expected. The exact date remains unclear, but the country is swimming in speculation about mysterious power struggles as the gathering, possibly next month, approaches.

In all the mayhem, one can spot the efforts by powerful forces to rile what used to be called “the street.”

In the Muslim world, Islamist parties have a firm tradition of anti-Western ideology. An American-made film insulting the prophet Muhammad can boost their support. The film is despicable, but with today’s technology there will be someone, somewhere, saying or drawing or filming something offensive. Political and religious leaders have a choice of when to mobilize their followers.

Egyptian President Mohamed Morsy, who came from the Muslim Brotherhood, saw the tiger coming, and he tried to ride it.

Last week, as protesters unleashed their ire in front of the U.S. Embassy in Cairo, and news that extremists in Libya had killed four Americans, including U.S. Ambassador Christopher Stevens, Morsy’s reaction was not to condemn the killings or the violations of a fundamental tenet of diplomacy and international law. Instead, he demanded the U.S. take legal action against the filmmaker.

His Muslim Brotherhood sought to wave the banner in defense of Islam, initially calling for more protests. It took several days before Morsy, on a European tour, called the attacks on all embassies “unacceptable.” If Egypt wants foreign investment, its government can’t support attacks against foreign embassies.

The entire Arab world is engaged in a crucial power struggle. The people are waging a historic battle to determine what role Islam will have in government, in daily life and in the law. Anti-Western protests, under the banner of defending Islam, amount to raucous political rallies in support of the more radical, anti-liberal positions.

Those in power face a delicate situation. They want to wrap themselves in the flag of Islam, prevent their rivals on the right from gaining the upper hand but must avoid appearing irresponsible in the eyes of the international community, the support of which they need to stabilize their economies. Seeking to benefit from the intensity of emotions, Islamist militants such as Lebanon’s Hezbollah called for more protests.

The Chinese government also tried to calibrate resentments. Critics noted that in China’s one-party system, you don’t get a week of violent protests without government approval.

Authorities stoked the flames with praise for the public’s “expression of patriotism,” which the official media called “reasonable” and a “natural reaction” to Japan’s provocation. Then, perhaps nervous that demonstrations might turn against the regime, they tried to throttle back the violence.

Chinese dissidents examining pictures of the protests said they noticed government officials working the crowd.

Massive, seemingly spontaneous protests can strengthen a government’s hand against outsiders and has a rally-round-the flag effect that can strengthen a regime. But some speculated that hard-liners in the Communist Party were trying to bolster their position, perhaps trying to postpone the Party Congress and buy more time to organize.

When the protests threatened to get out of hand and take a perilous economic toll, the government tried to pull back the reins. Japanese corporations, such as Honda, Panasonic, Sony and others shuttered operations in China, as the Japanese public, aghast, watched the scenes from just across the sea.

Japan and China have more than $340 billion in trade. No government benefits, if the two economies are weakened.

This latest fashion, blending domestic politics and diplomacy-by-mob, is a dangerous development.

Politicians who try to ride the tiger of populist rage, whether in East Asia or the Middle East, will discover they can’t always rein back the crowd’s passions. They may want it to charge against their enemies. In the end, however, everyone could get mauled.

Follow @CNNOpinion on Twitter.

Join us at Facebook/CNNOpinion.

The opinions expressed in this commentary are solely those of Frida Ghitis.