Ten regimes chose this ancient town in Jiangsu province as their capital through thousands of years of Chinese history, and every single one of them was short- lived.
Some locals call it a curse, as their city marks the centenary of the Republic of China's founding in 1912 - the last time Nanjing was the heart of the country.
Who can blame them? While other ancient Chinese cities like Xian and Beijing rejoice in their long regal heritage, Nanjing grapples with its ephemeral rulers.
Eastern Wu of the Three Kingdoms period in AD229 was the first to make Nanjing, then known as Jianye, a capital. It crumbled after 51 years.
A succession of dynasties continued their fleeting romance with the city, with Eastern Jin lasting the longest - 103 years - and the Taiping Heavenly Kingdom the shortest at 11 years.
Even the famous Ming Dynasty stayed in Nanjing for only 42 years after its founding in 1368. The Yongle emperor then demoted it and moved north to Beijing, where the regime ruled for another 234 years.
When Sun Yat-sen revived it as a capital in 1912 for the new republic, he rounded up an imperfect 10.
His Kuomintang held on to power for only 37 years before escaping to Taiwan after defeat by the communists.
Nanjing was the capital of China for a total of 451 years, an average of just 45 years for each of its 10 regimes.
By contrast, Xian hosted the dynasties of Tang for 286 years and the Han for just over 200 years. Luoyang, another ancient capital, was the seat of the Eastern Zhou for more than five centuries, not to mention many other kings and emperors.
Poor Nanjing. As the local Modern Express daily asked in 2010 in a feature on the curse: 'Is Nanjing really the nightmare of dynasties?'
The more superstitious residents blame it on a tale from the ancient past.
It is said that China's first emperor Qin Shi Huang, who had his capital in Xian, was struck by the regal air of Nanjing during a visit.
He was afraid that a new sovereign would rise from the city, challenging him and his descendants. So he decided to break its good fengshui by lobbing off ridges of two mountains and diverting water from the Huai River through the city.
But historians believe there are rational explanations for the trend. For one thing, the geography of Nanjing lures certain types of leaders.
Protected by the Yangtze River to the north and mountains to the south, it is a city which is easy to defend and hard to attack. It thus attracted defensive-minded rulers who prized stability and contentment over all else.
They were quite happy to remain in southern China rather than charge into the heartlands of the country and up north.
But this left the regimes vulnerable to China's historic threats - the nomadic tribes such as the Mongols and Jurchens in the north and west.
'North-west Xian or northern Beijing allowed quicker forays into the deserts and grasslands, ensuring peace and a regime's longevity,' said historian Zhao Dexing from the Nanjing Academy of Social Sciences.
'In this regard, they made better capitals.'
Nanjing's location did not help; it is situated in the Jiangnan region, renowned for its milder climate and beautiful women, and is known as the 'land of fish and rice' in China.
The good life softened regimes, discouraging them from expansion and lulling them into a complacency which usually led to destruction by invaders.
This applied to the Taiping Heavenly Kingdom, which grew accustomed to the comforts of Nanjing in the mid-19th century and lost the zest to march on to Beijing to take down the Qing empire.
But of course, the curse may simply be due to bad luck. Most of the 10 regimes were set up during chaotic times.
The first six dynasties, for instance, were all formed when China was caught up in a period of warfare and turbulence.
Professor Zhao said: 'Every dynasty here fell for different reasons and you have to study them objectively.
'It is not fair to just blame Nanjing.'
But until the city gets another stab at being a capital and prove the rest of China wrong, it will have to live with the curse.