When I studied Chinese many years ago, my teacher in Beijing explained to me the meaning of the word “hen” for hatred: It’s the way we Chinese feel about Japan.

And, a couple of times over the years, I’ve had Chinese tell me that America’s big mistake after World War II was failing to exterminate the entire Japanese population.

This loathing for Japan, now harnessed to a growing military power, forms the backdrop for dangerous tensions in the East China Sea. Nobody wants war over a handful of uninhabited rocks in the Pacific Ocean, but there’s a risk of an accident spinning out of control. Moreover, Japan, China and the United States have botched their handling of these enormously sensitive territorial disputes, and we now have nationalists at the helm of Japan and China.

This is a chance for everyone to take a deep breath and think about the rise of China — the most important geopolitical trend of our time. China is projected to surpass the United States to become the world’s largest economy, after allowing for price differences, in about three years, according to estimates of the Organization for Economic Cooperation and Development, a group that includes the world’s industrialized countries. China’s currency has just overtaken the euro as the second most used in trade finance, after the dollar.

China’s government is investing heavily in its military, including a blue water navy, and plenty of Chinese believe that their government has been too conciliatory and wimpish. Indeed, a more democratic China might well be more assertive and more challenging to its neighbors — particularly Japan.

China actually has a reasonable claim to the Diaoyu Islands, as it calls them, although it is increasingly ham-handed in asserting those claims. The strongest evidence comes from Japanese government documents of the Meiji era, referring to the islands as China’s and scheming to grab them — which is what Japan did when China was weak in 1895. It renamed the islands the Senkakus.

After World War II, the United States controlled the islands, and, in 1972, it handed over “administration” to its ally Japan without taking a position on who owns them. Conflict has grown with rising nationalism in both China and Japan (Taiwan, which also claims the islands, has been most levelheaded).

Japan erred last year when it bought the islands from a private landowner — nationalizing them — despite strong warnings from both China and America. Likewise, the Obama administration was wrong to say explicitly that it would back Japan in any war over the islands.

Really? We’re ready to fight over uninhabited rocks when we don’t even take a position on their ownership? If Washington’s intention was to get Beijing to back off, this was counterproductive. The move just inflamed Chinese opinion.

“We are dealing with an extremely delicate situation,” notes Cheng Li, a China expert at the Brookings Institution. He worries that Americans may not always appreciate the sensitivities involved.

China’s new leader, Xi Jinping, is a complicated figure and a self-confident nationalist who has ties to some of the fiery ultranationalists in the People’s Liberation Army but also wants good relations with Washington. He presumably is behind China’s declaration last month of an air defense identification zone that overlaps with disputed territory.

Xi badly overplayed his hand. There’s nothing wrong with China declaring such a zone (the United States and Japan both have them), but it was done in a bellicose way that echoed similar belligerence in the South China Sea. And the world doesn’t have much sympathy for China’s leaders when they bully neighbors, blockade news and social media websites, and imprison a Nobel Peace Prize winner like Liu Xiaobo.

China’s Foreign Ministry officials offer Xi sensible counsel, but they are often outmaneuvered by hawks in the military. I once asked a Chinese general about moderate Foreign Ministry statements on the South China Sea. The general scoffed: “That’s the Foreign Ministry’s position, not China’s position.”

One risk is of a military accident like the 2001 collision of a U.S. spy plane and a Chinese fighter aircraft. The Chinese leader at the time, Jiang Zemin, returned the American plane and crew, but Xi might not be so conciliatory.

The upshot is that we need crisis hotlines so we can manage a crisis if it happens. The Obama administration also needs a senior point person for China, which it doesn’t really have now.

For his part, Xi should realize that saber-rattling distracts from economic development and that an emerging great power like China cannot harness modern weaponry to old and almost tribal hatreds. Those of us who admire China’s accomplishments need to make the point that nationalist propaganda, muscle-flexing and demonizing Japan are dangerous games. As a Chinese saying goes, it’s easier to ride a tiger than to dismount.