BEIJING - China's one-party state has survived as other communist regimes crumbled by embracing capitalism to deliver new wealth - but is turning increasingly to nationalism in place of a coherent ruling ideology.
The Communist Party congress that begins in Beijing this week to proclaim Xi Jinping as its new leader takes place in a city replete with luxury sports cars and hotels, and a country with a growing consumerist middle class.
The party still pays lip-service to Marxist-Leninist rhetoric and trains its cadres in Maoist philosophy - and also in business management and high finance, injecting a gaping contradiction into China's ideological mindset.
But any talk of political reform to resolve that contradiction is in abeyance. And with public opinion ever less willing to tolerate corruption, and factory workers and migrants increasingly restive, the party is also cultivating patriotism - to the alarm of its neighbours and Washington.
"Faith in socialism has become problematic, so the Chinese authorities are seeking other sources of legitimacy, and of course nationalism is a dream substitute," said Jean-Philippe Beja, a political scientist at France's National Centre for Scientific Research.
"The Communist Party can boast of having fulfilled the dreams of all the country's leaders since the Opium War (from 1839): giving China its rightful place in the world," he said.
"To maintain that, they must assert themselves against their neighbours, beginning with Japan."
This year Japan, China's perennial bogeyman, has found itself under verbal fire over five uninhabited islands in the East China Sea, controlled by Tokyo but claimed by Beijing - and Taipei.
Chinese authorities facilitated mass anti-Japanese protests across the country that spiralled into rioting in some areas and serious production losses at factories in China owned by the likes of Toyota and Sony.
Winston Lord, a former US ambassador to China who accompanied Richard Nixon when he became the first US president to visit Beijing in 1972, warned of China's communists resorting to xenophobia if the Xi regime feels threatened.
"If they don't make changes in their economic and political system in the next decade, I think you could see real instability, which could in turn lead to a more nationalistic and aggressive foreign policy," he said in Washington last week.