Next Tuesday, the International Tribunal for the Law of the Sea will issue its ruling on China's claim to practically all of the South China Sea. And already the main military contenders are moving more forces into the region.
China's Maritime Safety Administration announced that Chinese naval and air forces will carry out seven days of exercises in an area extending from Hainan to the Paracel Islands off the Vietnamese coast. The exercises will end on Monday, just one day before the tribunal's ruling is released, so they will still be around if things get more exciting after that.
They might well get more exciting, because the US Navy's Task Force 70, including the aircraft carrier USS Ronald Reagan, has now moved into the South China Sea. Its task, according to its commander, Rear-Admiral John D Alexander, is "to maintain the seas open for all to use".
The Chinese Defence Ministry's spokesman, Col Wu Qian, warned last Thursday that this is "an act of militarisation in the South China Sea and it endangers regional peace and stability. But I'd like to say that the US side is making the wrong calculation. The Chinese armed forces never give in to outside forces". And on Friday President Xi Jinping declared that China will never compromise on sovereignty and is "not afraid of trouble".
Gwynne Dyer is an independent journalist whose articles are published in 45 countries.
So the stage may be set for a serious US-Chinese military confrontation if the Hague tribunal rules against China's claim next week as expected. The US military fear that China may respond by declaring an Air Defence Identification Zone over the whole of the South China Sea, like the ADIZ it declared in the East China Sea in 2013 in its quarrel with Japan over disputed islands there.
In a worst-case analysis, therefore, we could be only a week away from a major military clash between the US and China in the South China Sea. But it really shouldn't go that far, because the Hague tribunal's ruling will have no practical effect.
China's "nine-dash line" claim to almost 90% of the South China Sea looks preposterous on a map -- it extends more than 1,000km from the southern-most point of China while coming within less than a 100km of the Filipino, Malaysian and Vietnamese coasts -- but it is taken very seriously in China.
The historical justifications for Beijing's claim are flimsy, but beginning with the seizure by force of the Paracel Islands from Vietnam in 1974, China has extended its control to most of the tiny islands and reefs in the entire area.
In the past three years it has expanded seven of these tiny footholds with concrete and landfill, building airstrips, port facilities and other potential military assets on them. In February, for the first time, it put actual weapons on them. Whether or not this was directly in response to the case brought against it in The Hague by the Philippines in 2013, it certainly had the effect of making a military confrontation more likely.
But China stated in advance that it would not recognise any ruling on the validity of its claim by the UN-backed Hague tribunal, which has no way to enforce its decision. So it should not feel obliged to resort to military force to defend its claim, any more than the US should feel any need to use force to challenge it. In theory.
Behind the sometimes belligerent rhetoric from Beijing, there has been a long-standing policy that China should avoid military confrontations with other great powers until it has grown strong enough economically to stand a good chance of winning. It's not there yet, so it should still be gun-shy. But there may now be another consideration at work.
The social contract that keeps the Chinese Communist Party in power is simple: so long as the Party delivers steadily rising living standards, the population will accept its dictatorial rule. For almost 30 years it has kept its side of the bargain, with economic growth rates of between 8 and 10% per year.
But even the Party admits that the growth rate is now down to 6%, and hardly anybody else believes it is even 4%. Some observers think the economy may not be growing at all this year. If that is the case, then the regime is drifting into dangerous waters, and it will need a foreign distraction to divert public attention from its failure.
An exciting but carefully contained confrontation over the South China Sea with the US and its Southeast Asian allies could be the solution, igniting nationalist passions in China and generating support for the regime, but the tricky bit is keeping it "carefully contained". Once you start down that road, you cannot be sure where it will take you.