China’s War with Japan, 1937–1945: The Struggle for Survival. By Rana Mitter. Allen Lane; 458 pages; £25. To be published in America in September as “Forgotten Ally: China’s World War II, 1937-45” by Houghton Mifflin Harcourt; $30. Buy from Amazon.com, Amazon.co.uk

AS JAPANESE troops advanced on the Chinese capital of Nanjing in 1937, Zhou Fohai, a senior official in the Chinese government, wrote in his diary of the panic and fear consuming the city. He anticipated the destruction and its implications for his nation: “China will have no more history,” he wrote.

The devastation that the Japanese invasion would wreak was indeed shocking. But as Rana Mitter shows in his illuminating and meticulously researched new book about the Sino-Japanese war, not only did Chinese history not end with the fall of Nanjing, but in many ways the war helped to create modern China. It was the anvil on which the new nation was forged.

Other historians point to the arrival of British gunboats in the 1830s, when industrialising Europe collided with ancient China, as the dawn of China’s modern age. But Mr Mitter, a professor at Oxford University, believes that the country’s war with Japan was more important because it reduced China to its weakest state. “Suddenly the circumstances of war made the concept of the nation, and personal identification with it, more urgent and meaningful for many Chinese.”

Mr Mitter may disappoint military wonks hoping for a blow-by-blow account of every skirmish. But this is not a military history. It is about the Chinese experience of war, the origins of the modern Chinese identity and the roots of a relationship that will shape Asia in the 21st century. It is about China’s existential crisis as it tried to regain its centrality in Asia.

It is also a story, pure and simple, of heroic resistance against massive odds. China is the forgotten ally of the second world war. For more than four years, until Pearl Harbour, the Chinese fought the Japanese almost alone. France capitulated in 1940, but China did not. Its government retreated inland, up the Yangzi river to Chongqing (Chungking)—a moment that would later be described as China’s Dunkirk (pictured). From there it fought on—sometimes ineptly, often bravely—until victory in 1945.

One mountain, two tigers

Asia has never had a strong China and a strong Japan. Their complex relationship in modern times began when Japan welcomed the West in the mid-19th century while China pushed it away. As Japan modernised, it became a model for Chinese reformers and a refuge for Chinese revolutionaries who opposed their own government’s insularity. Chinese students who went to Japan in the early 20th century included Sun Yat-sen, who led the 1911 revolution, and Chiang Kai-shek, the man who would lead the Nationalist government of China against Japan in the 1930s.

But as Japan’s imperial ambitions grew, China was the obvious place to expand. In 1931 Japan occupied Manchuria, turning from mentor to oppressor. The full-scale invasion began in 1937. Mr Mitter does not skimp in narrating the atrocities; the stench of war infuses his narrative. But he paints a broader account of the Chinese struggle, explaining the history that still shapes Chinese thinking today.

Westerners are there as soldiers, missionaries and journalists. Christopher Isherwood and W.H. Auden, both English writers, arrived from the Spanish civil war in 1938. Isherwood’s diary exudes a pride shared by European progressives in the struggle against fascism: “Today Auden and I agreed that we would rather be in Hankow at this moment than anywhere else on earth.” Most Chinese people, suffering the Japanese onslaught without a ticket out, longed to be anywhere but Hankow. Up to 100m people (20% of China’s population) became refugees during the conflict. More than 15m were killed.

It is the voice of the Chinese, not that of the foreigners, that gives the distinctive tone to Mr Mitter’s narrative. From the diaries of Chiang Kai-shek to those of national journalists and middle-class Chinese fleeing the conflict, these first-person observations are woven skilfully into his chronicle of the battles and struggles. We all know about Iwo Jima, but who in the West has heard of the defence of Taierzhuang, when Chinese soldiers defeated superior Japanese troops in hand-to-hand combat? Yet its memory will continue to help shape Asian history. We know what Dwight Eisenhower thought at key moments of the second world war, but few have heard of Xiong Xianyu, an army commander who kept a diary of blowing up Yellow River levees to stop the Japanese advance. Nearly 1m Chinese died in the resulting floods. “My heart ached,” he wrote. The water flowed “like 10,000 horses”.

The war was seminal for China, and is still crucial for understanding the virulent anti-Japanese emotions of Chinese people today. The country was not just the forgotten ally, says Mr Mitter, but also the one most changed by the experience of war. Britain and America re-emerged into the boom-times of the 1950s. The Soviet Union was pushed to the brink and did not break. But while “battered, punch-drunk” China never surrendered, its old system of governance was destroyed.

The old order, symbolised by Chiang Kai-shek and his corrupt Nationalist party, had joined with Mao Zedong’s Communists to fight the Japanese. When victory came in 1945, it was clear the system could not continue. Mao presented a more attractive, less corrupt vision of a new Chinese state (one that he soon betrayed). His victory in the ensuing civil war (1945-49) and control during the cold war that followed ensured that a narrative of the Sino-Japanese war that did not include Communist heroism was airbrushed out.

Mr Mitter’s book rectifies some of those distortions of history. But the ghosts of the war with Japan have never been laid to rest. Chinese leaders still use the past as a stick to beat their neighbour. Now, from a position of strength, how China deals with its old mentor and enemy will be crucial in shaping the region in the 21st century.