IN A schoolyard in a village on the dusty north China plain, martial artists drill children in the stylised kicks and punches of Plum Flower Boxing. This discipline, they proudly claim, spearheaded the Boxer Uprising of 1900. In a village recreation room, musicians practise the ear-splitting tunes which their ancestors played for Boxer braves heading into battle with the foreign “hairy ones”. Folk memories abound of an event that transformed the country's relationship with the West, and its own view of itself.

The Boxer Uprising, 11 years before the collapse of China's last imperial dynasty, was portrayed in Western accounts as a savage outburst of primitive xenophobia directed at the West and its civilising religion, Christianity. The northern Chinese peasants with their red headscarves, who believed in a magic that protected them from foreign bullets and in the power of ancient martial arts that could defeat the industrial world's most powerful armies, were described with a mixture of fear and racist scorn. But in China the Boxers are officially remembered as somewhat misguided patriots. In the countryside south of Beijing where they burned churches, killed foreign missionaries and slaughtered tens of thousands of “secondary hairy ones”, as Chinese converts to Christianity were known, some call them heroes. The missionaries they attacked had it coming, having trampled on China's sovereignty. Their converts were no more than local ruffians who exploited foreign protection to ride roughshod over their countrymen.

In East Zhangwu Village, close to the railway line between Beijing and the port city of Tianjin, the village doctor is a Boxer fan. Sitting behind his desk in the clinic, he recounts, as if he had seen the action himself, how one sultry June local Boxers tore up the line to stop a trainload of foreign troops from heading to Beijing to break a siege of the capital's embassy district by pro-Boxer imperial troops. “The foreigners had a couple of interpreters who said to the Boxers, ‘Don't fight, we'll give you some money, OK?' The Boxers replied, ‘We don't want money. We want the foreigners' heads'.” He shows off a copy of the scores used by the musicians whose flutes, cymbals, drums and pipes accompanied the Boxers into combat. He and a group of fellow enthusiasts have formed what they call the Boxer Band. It performs at ceremonial send-offs for local army recruits. A picture of Boxers charging into pith-helmeted foreign soldiers covers a wall of their practice room.

The martial-arts tradition of the Plum Flower Boxers of Pingxiang County, 325km (200 miles) south-west of Beijing, goes back centuries, but it is the prominent role of Plum Flower Boxing masters 110 years ago in “exterminating the foreign” (as the Boxer slogan urged) for which it is best remembered. During the uprising, the Plum Flower Boxers renamed themselves the “Righteous and Harmonious Fists”. The name was adopted by the movement as a whole, which embraced many martial-arts sects in drought-parched northern China. At Pingxiang's Mingde Primary School, since last year synchronised Plum Flower Boxing drills in the playground have become obligatory. Yelling, the children jab their fists in unison at imagined enemies.

The rise of nationalism in an increasingly powerful China worries many foreigners. They fret about the emergence of a new breed of Chinese who are often called fenqing, or angry youth. The fenqing are often dismissive of economic and political liberalism and scornful of the notion of universal rights. The rebellion and subsequent invasion by an eight-nation allied force of Western and Japanese troops that lifted the 55-day siege of Beijing's legation quarter and embarked on an orgy of looting and indiscriminate violence loom large in their cultural memory.

Sinophobia was fashionable long before China emerged as a global power

China's nationalists have plenty of examples of Western imperialist outrages to pick from, but the eight-nation force holds a particular fascination. A divided West formed an extraordinary alliance in 1900 to deal with the Chinese threat: British, Germans, Russians, Americans, Italians, French, Austro-Hungarians and even Japanese (playing their first role as honorary Westerners). In the G8, NATO and the Japan-America alliance the fenqing see spiritual descendants of the invaders of 1900.

Ever since the uprising, memories of it have troubled the relationship between China and the West. For the West, “Boxerism” became synonymous with a rabid, anti-foreign demon that was thought to lurk in China, ready to wreak bloody havoc if given a chance. As The Economist advised its readers in 1905: “The history of the Boxer movement contains abundant warnings as to the necessity of an attitude of constant vigilance on the part of the European Powers when there are any symptoms that a wave of nationalism is about to sweep over the Celestial Empire.”

That was the year of Japan's defeat of Russia. Never before had an Asiatic power defeated a European one. Fears of a “yellow peril” stalked Europe. These anxieties found fictional expression in the evil Dr Fu Manchu, invented by an Irish writer, Arthur Ward, under the pen-name Sax Rohmer. In the first novel about him, published in 1913, Dr Fu is described as “the yellow peril incarnate in one man”. Fu Manchu movies were still being made in the 1960s. Sinophobia was fashionable long before China emerged as a global economic power.

Such worries occasionally resurface. They reappeared in 1967 when Red Guards shouting “Kill, kill”, (“the same cry that had been heard at night during the Boxer Rebellion”, wrote a former British envoy, James Hoare) besieged and burned the British mission in Beijing and assaulted its staff; in 1999 when thousands of students hurled paint and stones at the American and British embassies in Beijing after NATO warplanes bombed the Chinese embassy in Belgrade; and again in 2008 when at least ten foreign correspondents in China received death threats amid an outpouring of anti-Western vitriol in the wake of upheaval in Tibet. The Japanese have been among the biggest worriers, their anxieties fuelled by large and sometimes unruly anti-Japanese protests in several Chinese cities in 2005 and again this year.

A journey through the Boxers' heartlands shows that many Chinese share these worries. Debate still rages over what to make of the Boxer Uprising and how it relates to Chinese nationalism today. In 2006 a liberal weekly newspaper supplement, Freezing Point, was briefly closed down and its editor fired for publishing an article that said the portrayal of Boxer history in Chinese textbooks was poisoning the minds of young people. A journalist for History, a Beijing magazine, compares the empress-dowager Cixi's manipulation of the Boxers with Hitler's of German nationalists. China, he says, is in danger of breeding a similar mentality of vengeful nationalism unless it gets its history straight.

Bicycles and boxing

On a road lined with maize fields and factories that leads into the county seat, a huge billboard boasts of a “city famous for bicycles, the birthplace of Plum Flower Boxing and a countryside with an eco-friendly water system”. Pingxiang County is indeed one of China's biggest centres of bicycle and bicycle-parts production, but it has struggled to shed a reputation for brand-name knock-offs. The fetid open drains lining the main street of the town do not smell eco-friendly; the place is officially designated poor. But locals reckon that Plum Flower Boxing could give them a boost.

In 2006, after much lobbying by Zhang Xiling, the owner of a printing factory and expert in the art, the central government included Plum Flower Boxing in its first-ever list of “intangible cultural heritages” worthy of protection. Early in 2010 Mr Zhang started work on what he and the local government (which has a small share in the project) hope will one day be a 200-hectare Plum Flower Boxing park, with temples, luxury hotel facilities, a training school for martial arts and an annual turnover of $750m.

The Boxer Band tunes in to history

The Boxers' negative image in the West is of little concern. The scheme is aimed primarily at Chinese. The Communist Party has always had a soft spot for Boxers, in contrast with the Nationalist government it toppled in 1949, who called them “bandits”. Paul Cohen, an American historian, described in a 1997 book on the Boxers how, by the 1920s, Chinese revolutionaries were beginning to rework the Boxers into “a more positive myth”. Mao Zedong's Red Guards sometimes called themselves “new Boxers”.

Jeffrey Wasserstrom, another American historian, says that in the post-Mao era official rhetoric has shifted from glorifying Boxer violence to focusing on the foreign invasion it triggered. But the Boxers remain in favour. In 2009 the party's main mouthpiece, the People's Daily, published an article on its website saying the “anti-imperialist, patriotic” Boxer movement had caused “utter panic” among imperialist countries that had been trying to carve up China in the late 19th century. Officials are happy to give the nod to places like Pingxiang. But there is a proviso: they must not alarm foreigners.

Pingxiang, eager to boost exports and attract foreign investment, has no wish to. The kung fu lessons at Mingde Primary School are not an attempt to revive anti-foreignism. The headmaster, Yang Peihua, explains tactfully that they help improve memory and concentration and instil “morality”. He says the children have become keener on household chores.

Mr Zhang says he would like to have a Boxer memorial in his park, but he thinks the government will object. The experience of the neighbouring county of Wei, the birthplace of one of the area's best known Boxer leaders, Zhao Sanduo, suggests he might be right. In 2000, the 100th anniversary of the Boxer Uprising, it started building a spacious Boxer museum. The $1.2m edifice was touted as China's monument to Boxer history. Leading military officers from the Hebei region attended the opening ceremony in 2003. A large bust of Zhao took pride of place inside. The museum was named a provincial-level base for “defence education”.

The authorities later had second thoughts. The bust was moved to a less prominent position outside. The other exhibits (including a large black-and-white photograph of Zhou Enlai, China's prime minister in the Mao era, proudly holding up a Boxer flag) remained intact. But large characters proclaiming the building as the “Boxer Memorial Hall” were replaced with “Hebei Province Patriotic Education Base”. In East Zhangwu Village a nervous official tries to steer the conversation away from Boxer history towards the Boxer Band's music.

Some Chinese share the foreigners' point of view. In the village of Zhujiahe, about 120km (75 miles) to the north-east of Pingxiang, the Boxers are remembered as butchers. It was here that one of their bloodiest acts of violence occurred. Zhu Junhuan, who is 75, describes how her Catholic great-grandmother was killed by a combined force of Boxers and Chinese imperial troops as she was spreading her arms to protect a French missionary priest. The Boxer episode is commonly portrayed in the West as an orgy of anti-foreign violence. But the 200-300 foreigners who died in the uprising were far outnumbered by Chinese victims.

Because both killers and victims in Zhujiahe were Chinese, communist histories gloss over the massacre. Wei County's museum offers a rare mention of the event as if it were one of a series of Boxer victories (“three or four thousand religious followers were killed or drowned themselves”). It displays a grainy photograph of the village's “captured” Catholic church, in ruins.

The fault lines of Chinese nationalism are visible in Zhujiahe, a cluster of brick houses surrounded by fields of maize. About 70% of its inhabitants are Catholic. They would like to honour “martyrs” killed by the Boxers, but fear upsetting officials.

The Catholic church has a difficult relationship with Chinese nationalism. China refuses to recognise the Vatican because of its insistence on retaining the right to appoint Chinese bishops, which China regards as an infringement on its sovereignty. China has its own “patriotic” Catholic church, whose leaders are vetted by the Communist Party. The Vatican, to avoid being shut out of China altogether, accepts worship in the government-backed church as legitimate. But some Chinese Catholics still shun it and, risking punishment, worship “underground”.

Zhujiahe church is opened for the foreigner

In Zhujiahe, the conflict between faith and party-defined patriotism came to a head in 2000 when Pope John Paul II declared 120 Catholics who had died in China between 1648 and 1930 to be saints. They included the first Chinese citizens ever to be so honoured. Sixty-six of the Chinese were killed in the Boxer Uprising. Three died in violence related to the siege of Zhujiahe. The government was furious. It condemned the saints as “evil-doing sinners” and said their canonisation was a “gross insult to the Chinese people's patriotic resistance against foreign aggression and oppression”. The pope's choice of China's national day, October 1st, to make the announcement added salt to the government's wounds.

Zhu Junhuan was delighted. Her great-grandmother became Saint Mary Zhu. She is a devotee of her ancestor: prayers to Saint Mary, she says, have helped cure illnesses. But the state-controlled church frowned on celebrations. A low-key ceremony was held in the nearby county town, not in the village itself.

Zhujiahe church was rebuilt after the Boxer Uprising but destroyed again during the Cultural Revolution, and has not been restored since. On a Sunday, a villager finds the key to its huge red wooden outer gate to show a rare foreign visitor around. It is a small brick-built former storeroom with no pews. Pictures of Zhujiahe's five saints (two bearded Frenchmen and three Chinese) adorn one dirty, cracked wall. A larger picture is propped up beneath them, half-hidden by a desk. It shows a woman, presumably Saint Mary, her head pouring with blood, standing in front of foreign-looking priests. Flames and smoke curl up around Chinese women and children in the foreground. The picture is captioned, “The Martyrs of Zhujiahe”. The courtyard is piled with bricks that villagers have been hoarding in the hope of one day building a new church. But fears of upsetting saint-resenting officials have held them back.

In the village of Donglu, 150km (93 miles) to the north-west, the party's narrow interpretation of patriotism (essentially, supporting the party) hits another rut. The spires of a Gothic Catholic church have recently been painted gold. The church honours the Virgin Mary, who residents say appeared above the village in 1900, clad in radiant white, and helped defend it against more than 40 Boxer assaults (miraculously, they say, Boxers died in profusion while few villagers or other Chinese Catholics perished). “Holy Mary of Donglu, Pray For Us”, say large red characters attached to its railings, echoing the pleas of the besieged 110 years ago.

The story of Mary's appearance over the village has become central to Chinese Catholic faith. The mother of Jesus is believed to have confronted the “patriots”, and to have won (although Joseph Esherick of the University of California, San Diego, says in a history of the period that Catholics in Hebei were well-armed by their missionary leaders and, in their mission bases, “were usually able to hold off Boxer attacks”).

It is a hard story for the party to tell. Who are the real patriots? The party's “patriotic” Catholic church cannot easily reject Mary herself. In 1924, 25 years before the communists came to power, papal recognition of the Donglu apparition was sought by the first meeting of Chinese church leaders. This was a crucial event in the evolution of a Catholic church led by native Chinese. The meeting asked that an image of Mary holding the baby Jesus, both dressed in Chinese imperial costume, be recognised as that of Our Lady of China. It was intended to symbolise the church's Chinese-ness, something the government-backed church today is also eager to promote (ironically, the image was based on another picture—of the foreign-hating empress dowager).

Both killers and victims in Zhujiahe were Chinese, so communist histories gloss over the massacre

The Vatican agreed to the Shanghai meeting's requests and Donglu became a centre of Marian worship. Under communist rule, Mary the conqueror of “patriots” found herself grudgingly adopted by the “patriotic” establishment. Donglu and the Baoding diocese to which it belongs have been the scene of the official church's bitterest struggles with underground Catholics. Backing Donglu's Marian shrine has been a way of keeping Catholics in the region from devoting their loyalty to the underground, whose priests are often harassed or detained by the police. But officials remain wary. Every year in May, as the church prepares for the annual festival of Our Lady of China when her image is paraded around the village, police set up checkpoints on the narrow roads leading to Donglu to prevent non-locals from attending. Huge displays of Mary-adoration would be embarrassing to party officials and could be used as cover for protests by underground followers.

The Communist Party knows that popular nationalism could turn against it. Its efforts to equate patriotism with support for the party leave many patriots who are critics of the party feeling left out. When nationalist demonstrations occur, such as against Western countries who are perceived to have offended China, these dissidents readily join in, posing a threat to the government.

At the end of the 19th century the empress dowager struggled with a similar conundrum: support the Boxers and risk being overwhelmed by them, or crush them and risk being accused of pandering to foreigners. At first she supported them, and then she turned against them; but by then it was too late to save the dynasty.