After violent demonstrations in as many as 100 cities, the Chinese government has called a halt to four days of officially sanctioned anti-Japanese tantrums.

How sanctioned were they? Well, over the weekend, Chinese demonstrators approaching the Japanese embassy in Beijing were welcomed by the police.

All cell phones entering the neighbourhood received an automatic text message that read "The Beijing Public Security Bureau reminds you to please express your patriotism in a rational and orderly fashion and to follow police instructions. Thank you for your co-operation."

This morning the message was changed to: "Protest activities have come to an end."

By permitting and, indeed, encouraging demonstrations that included hurling eggs, water bottles, stones and other missiles at Japanese diplomatic missions in Chinese cities, the authorities also opened the door to even uglier expressions of indignation.

Banners and slogans, many of them obscene, referred to Japanese as "dogs," "devils" and an epithet originating in the long history of coastal enmity between the two countries, "dwarf pirates."

Huge crowds shouted chants calling on the government to declare war on Japan and "exterminate" the Japanese.

Japanese businesses were attacked. Japanese cars were hijacked and burned. After one such incident in Tianjin, internet activists identified the ringleader of a gang destroying a Japanese car as the local police chief.

Offshore oil

The demonstrations were China's response to Japan's latest move in the long-simmering dispute over five uninhabited rocky islets in the East China Sea, not far from where China has one of its bigger offshore oil and gas developments.

china-protest-300-03286421

A Chinese woman steps on a Japanese flag with black Chinese characters Do not forget Sept. 18, Japan imperialists right-wing elements must be defeated in Beijing on Tuesday. (Ng Han Guan / Associated Press)

Known to China as the Diaoyu Islands, and to Japan as the Senkakus, they are suddenly back in the spotlight because the Japanese government last week announced it would purchase three of the islands from the Japanese family that owns the title to them.

China regards the change of ownership as an attempt to reinforce Japan's claim to sovereignty over that part of their mutual waterway and rejected the Tokyo's position that it was acting to forestall a much more undesirable outcome.

The Japanese government had been paying rent for the islands, and expected to maintain the status quo by renewing the lease when it was to have run out this month.

It negotiated the purchase only after the governor of Tokyo, Shintaro Ishihara, a provocative right-winger constantly seeking new ways to offend China, announced that he intended to buy the islands and develop them.

It was a provocation with a very long history.

Forty years ago this month, when China and Japan resumed diplomatic relations, after decades of hostility, China's negotiator, Deng Xiaoping, who later became his country's supreme leader, explained why the two sides had agreed to set aside the dispute over the islands.

"Our generation is not wise enough to find common language on this question." he said, "Our next generation will certainly be wiser. They will certainly find a solution acceptable to all."

Deng's confidence was misplaced.

Far from finding a wise solution, this generation of leaders has made things worse.

On the Japanese side, its leaders have allowed themselves to be led by the nose into a crisis engineered by an extremist politician with an eye on elections in a few months. Meanwhile, their Chinese counterparts have taken the low road of unleashing the mob to make their point.

A line in the water

The dispute is not a trivial one. The five rocky outcrops, the largest of which is less than five square kilometres in size, are key to sovereignty over a vast area of sea and its resources.

map-japan-china-islands

The five disputed islands, closer to mainland China than Japan, but history also has a part in this play.

For centuries, neither side paid much attention to them. Japan grabbed them as the winning side in the Sino-Japanese war of 1895. A Japanese company had plants processing fish and albatross feathers on the islands, but it went bankrupt in 1940 and nobody's been there since.

The U.S. took over administrative sovereignty at the end of the Second World War and handed the islands back to Japan in 1972 despite protests from China.

By that time, both sides were aware that something more valuable than fish and feathers was at stake.

A UN economic commission reported in 1969 that there could be large reserves of offshore oil and gas around the islands and so the dispute has gained intensity ever since.

Deliberate ambiguity

China's growing economic and military power has only added to the friction.

Japanese right-wingers like Ishihara trade on the notion that Japan should stand up to China now, before it becomes too strong to resist.

In China, resentment over the brutality of Japan's wartime occupation is never far from the surface and the timing of this latest incident has only exacerbated the crisis.

It was on Sept. 18, 1931 that Japanese military operatives blew up a Japanese-owned railway line in Northeastern China and used that as the pretext for a Japanese invasion and occupation that lasted until 1945.

That date is remembered in China in much the same way as Pearl Harbour day is remembered in the U.S., and China saw Japan's purchase of the islands just a few days before Sept. 18 as a gross provocation.

Only a few days before that it was Japan's turn to be worried. On Sept. 13, China submitted new "baselines" around the islands, to the UN Law of the Sea authorities.

Each country has the right to submit these demarcation "baselines" as the foundation of its sovereignty claims, and China's new submission contains details around the islands that were left out of its earlier submission in 1996, specifically to avoid exacerbating the dispute with Japan.

china-islands-280-03264632

Chinese Assistant Foreign Minister Le Yucheng tells recent a symposium on the history of the disputed islands that Japanese authorities have let the dispute escalate by giving free rein to trouble-making right-wing forces at home. (Associated Press)

Now, suddenly, deliberate ambiguity has been replaced by controversial claims that the Chinese navy and other maritime agencies may feel obliged to test or defend.

International differences over maritime sovereignty are not uncommon, of course.

Most of them, like Canada's dispute with Denmark over Hans Island in the Far North trundle on quietly for decades, and probably for centuries, without resolution.

Rational agreements can be made for sharing resources without either side giving ground on sovereignty, but rationality can disappear in the fog of extreme nationalism and bitter history.

The streets of Chinese cities are quiet again because the government has decided to rein in that part of its campaign.

But the end result of the last few weeks is that China and Japan have both dug their heels deeper into mutually irreconcilable positions.

The current political uncertainty in both countries will make it even more difficult for any leader to make concessions the next time the dispute erupts.