As Hong Kong recovered from its most violent day of protests so far, Beijing's English-language "Global Times" newspaper led on the celebrations of 70 years of Communist rule. The celebrations, it argued, showed the peaceful intent and unity of Chinese society - illustrating the article with a picture of a new ballistic missile it said could drop nuclear warheads on any place on earth.
Overall, President Xi Jinping may well have been largely satisfied with the optics of this week's celebrations, at least on mainland China. The last year, however, has been a particularly challenging one for the 66-year-old leader. The trade war with US President Donald Trump has not just hurt China economically, but thrown into question the continuation of the entire model of globalization to which Beijing has tied its fortunes for 30 years.
Unrest in Hong Kong shows no signs of going away. It is not just an embarrassment to Chinese rule but has also dramatically shifted dynamics on Taiwan, which Beijing unapologetically wishes back under its control by the hundredth anniversary of China's communist takeover in 2049.
The result is something of a paradox. China is by far the most powerful it has ever been, economically and militarily, and Xi himself has arguably also never been stronger. But a clear defensiveness, sometimes even bordering on paranoia, is coming into play. In his keynote speech on Tuesday, Xi warned that "no force can shake this great nation". The implication, however, appeared to be that he expected some to try.
Certainly, Xi and those around him see protest in Hong Kong as a serious threat to their control both there and in mainland China, and are increasingly open about saying so. Having initially imposed an almost complete news blackout on events in the territory, Chinese media are now working overtime to paint events there as deliberate destruction verging on terrorism, criminality that must be crushed.
Whether they will send in troops is another matter, however, although the use of live rounds on Tuesday suggests police in Hong Kong will use greater force. Friday's announcement banning the wearing of masks at protests could also dramatically escalate the confrontation.
Interestingly, Xi committed himself again to the "one country, two systems" arrangement for Hong Kong, suggesting that imposing direct rule from the mainland would be very much a last resort. The problem, however, is that Beijing has no real levers to stop the unrest beyond the use of force, and that to do so would be an admission of defeat and could usher in a humanitarian, diplomatic and economic catastrophe.
The controversial extradition law that initially sparked the protests, which would have seen Hong Kong citizens able to be taken to China against their will, has now been withdrawn. Offering any greater concessions, however, appears largely unthinkable to the mainland authorities, particularly demands for greater democracy or human rights. Xi and those who hope to succeed him will have no appetite whatsoever for such voices to build on the mainland and will fear every concession in Hong Kong may encourage just that.
Certainly, the rest of Xi's last decade at the top of Chinese politics demonstrates a sometimes brutal, often ruthlessly repressive and controlling style. Hundreds of senior officials and business leaders have vanished from public life as part of an anti-corruption crackdown that critics say was heavily aimed at removing rivals and keeping him in power. Activists and foreign governments say at least 1,000,000, perhaps considerably more, Muslim ethnic Uighurs are now held in camps in China's Northwest. It is almost certainly the largest incarceration of a minority or ethnic group since the Holocaust.
Already, that increasingly repressive trend internally has emerged alongside a much more coercive, militarily assertive international approach, particularly in China's immediate neighbourhood. China clearly continues to see its "soft power" – mainly the offer of investment – as a way of winning friends and influence through the One Belt, One Road scheme and beyond. What it appears to increasingly want in addition, however, is the ability to unambiguously threaten as well.
Retooling China's nuclear arsenal is clearly part of that – as was showcasing it quite so clearly this week. Ever since acquiring nuclear arms in the sixties, Beijing has generally been content to have considerably smaller numbers of the weapons than other superpowers. Now, it clearly sees itself as an equal competitor, with the ability to strike over enormous distances on land and sea a clear part of his current strategy to protect itself - and, when necessary, intimidate others.
That's already causing significant problems with relations with the Philippines, Vietnam and elsewhere – but nowhere more than Taiwan. A combination of military posturing and outrage on the island at events in Hong Kong has dramatically complicated Beijing's hopes for ever-closer political rapprochement, and may well make unification in the next 30 years outright impossible.
Therein, perhaps, lies the final irony. The more aggressive China gets, the more paranoid its leaders become and intensify their struggle for control, the harder Beijing may find it to get the things it wants.
A former reporter for Reuters, Peter Apps is a writer on international affairs, globalisation, conflict and other issues. He is the founder of the Project for Study of the 21st Century (PS21), a non-national, non-partisan, non-ideological think tank. Paralysed by a war-zone car smash in 2006, he also blogs about his disability and other topics.