Over the past ten days, three seemingly unrelated news events have riled China’s internet users into massive overreactions that have highlighted the ugly side of nationalism. If left unchecked, such nationalist sentiments could be a cause for concern regarding China’s future as a global leader.

On May 17, a little-known Chinese actress, Xu Dabao, attended the opening ceremony of the Cannes Film Festival, dressed in a bright red gown featuring the five-star national flag. But the apparent attention-seeking gimmick backfired and provoked the ire of Chinese internet users who accused her of desecrating the flag, forcing her to apologise.

Ironically, back in 2001, Zhao Wei, a leading Chinese actress, wore a skinny dress featuring the Japanese national flag in a fashion shoot, causing a national uproar with internet users and official media accusing her of eulogising Japan. Zhao was forced to apologise repeatedly but the incident still haunts her career today.

On May 19, the US media reported that two Chinese fighter jets had flown too close to an American military radiation detection plane patrolling over the East China Sea two days earlier, an incident that prompted the US to complain to China through diplomatic and military channels. The US complained the intercept was “unprofessional” but the Chinese Ministry of Defence spokesman disputed the US claim, saying that the intercept was both professional and safe, and urged the US to stop surveillance activities close to Chinese waters and borders.

While reporting the incident, official Chinese media have seemed more interested in playing up the bit about one of the Chinese jets flying upside down, directly over the American plane, like it was performing a gymnastic somersault. Some official news portals even organised detailed graphics and animations to show how the “somersault” took place, with headlines praising the pilot’s bravery and technique.

Such reports have elicited a swell of nationalistic comments from internet users encouraging Chinese pilots to undertake more such manoeuvres to counter US surveillance. But these commentators fail to mention how dangerous such actions can be and seem to have forgotten the Hainan Island incident in 2001, when a Chinese fighter jet collided in mid air with a US spy plane during an intercept.

The incident forced the US plane to land on Hainan Island, but the Chinese jet crashed into the sea, presumably killing the pilot even though his body remains missing despite an extensive search.

The ensuing tense standoff between the world’s two major military powers, though resolved peacefully, should be a sombre reminder of the risks of such actions.

WATCH: Yang Shuping’s speech

On May 21, when Yang Shuping, a Chinese girl from Yunnan (雲南), stepped up to the podium at the University of Maryland and gave her commencement speech, praising the “sweet and fresh, and oddly luxurious” air and free speech in the United States, little could she have expected the massive backlash she was to face at home. A video of her eight minute speech has gone viral in China, prompting a massive outpouring of negative comments from China’s internet users and other Chinese students studying in the US who accuse her of humiliating China.

New Silk Road: Why China should be wary of overconfidence

Emotions are running so high that even the People’s Daily and the Foreign Ministry spokesman weighed in last week, saying that any Chinese citizen should make responsible remarks.

Yang apologised the next day but angry internet users continued to attack her online and some have started to put her personal details online, a process known as “human flesh search”. Many have used harsh words to curse her, telling her not to return to China. In particular, many have accused her of lying about the pollution in her home town of Kunming ( 昆明 ). Yang had said she needed to wear a mask every day, but the city boasts consistently good air quality all year around, particularly compared to heavily polluted cities like Beijing.

The reactions have been so overwhelmingly negative that it is hard to find any reasonable voice calling for understanding of a young woman who has just graduated and simply wanted to express her feelings.

It is worth noting that the outpourings of public outrage against Yang’s remarks seem genuine enough and have not received much stoking from the Chinese authorities.

But nationalism is a double-edged sword as China is trying to project its economic influence overseas through mega investment projects like the Belt and Road Initiative and pursue a leadership role in global affairs. The very emotionally charged nationalistic sentiments could make people in neighbouring countries and beyond wary of China’s rise and its intentions. In Yang’s case, her opinions may have been seen as reinforcing negative stereotypes about China, but she did not deserve a backlash on this scale.

Even more worryingly, as the Chinese leadership has increasingly relied on stoking nationalism to bolster autocratic controls and maintain stability at home, the country’s youth have become increasingly intolerant and belligerent. This has much to do with the country’s massive propaganda machine and the education system which omits or distorts facts of history to fit the narrative of the Communist Party.

What plans for a 2,000 sq km metropolis say about Beijing’s power – and its ambitions

Indeed, as Yang said in her speech, where she grew up, “only the authorities own the narrative”, and “only authorities could define the truth”. China’s future leaders will be ill prepared to become world leaders if they are not imbued with the right sense of history and global outlook to embrace diversity and inclusivity.

Wang Xiangwei is the former editor-in-chief of the South China Morning Post. He is now based in Beijing as editorial adviser to the paper