BEIJING -- When Wu Xintong's favourite team, the Los Angeles Lakers, played the Brooklyn Nets in Shanghai this Thursday, she broke a viewing streak of more than 10 years and deliberately missed the game.

Until recently, the 20-year-old student in northern Hebei province had followed her idol, Kobe Bryant, religiously. She meticulously recorded in a notebook the details of every Lakers performance, down to the time stamps of certain players' moves. By her own accounting, two-thirds of her closet is filled with Lakers jerseys and other purple and gold apparel, not to mention the Lakers mugs, stickers and cellphone cases she keeps in a box.

But then Houston Rockets general manager Daryl Morey tweeted last week in support of anti-government protests in Hong Kong, and everything changed for fans like Wu. A new chant flooded Chinese sports forums: "I can live without basketball, but I can't live without my motherland."

The burst of patriotic fervour -- buoyed by Chinese companies swiftly suspending their NBA partnerships -- came on the heels of a grand celebration marking 70 years of Communist Party rule in China. President Xi Jinping, the country's most powerful leader in decades, has rallied the populace around the promise of a Chinese Dream and national rejuvenation, a stronger domestic economy paired with global influence to rival that of the U.S. It is a vision increasingly trumpeted by ordinary Chinese people, who have found solidarity amid a protracted trade war and Hong Kong democracy movement, crises that the government has portrayed as deliberate bids to contain China's inevitable development.

On China's National Day, as audiences across the country tuned in for a military parade that showed off long-range missiles and a nuclear-armed glider, black-clad demonstrators in Hong Kong were burning the national flag and defacing photographs of Xi.

The government has depicted the mass pro-democracy protests, which began peacefully in June but have grown increasingly violent, as fringe riots led by foreign-influenced separatists bent on destroying the semi-autonomous Chinese city. This narrative has largely succeeded on the mainland, where internet memes deride the protesters as "trash youth" and refer to Hong Kong as China's "high-maintenance girlfriend." After NBA Commissioner Adam Silver said he supported Morey's right to free speech, angry online nationalists set their targets on the basketball league.

"You eat at our house and then spit in our food," said commenters on the Twitter-like Weibo platform, referring to the NBA's multibillion-dollar ties to China.

The NBA controversy may have been the most high-profile, but it was far from the only debacle to involve an American corporation offending the ruling Communist Party's political sensibilities within the same span of days. Apple and jeweler Tiffany & Co. suffered immediate censure for appearing to support the Hong Kong protests, video game giant Activision Blizzard punished a high-ranked gamer for shouting Hong Kong protest slogans during a webcast, and "South Park" published a tongue-in-cheek apology for an episode about U.S. corporations succumbing to Chinese censorship.

On online forums and Weibo, web users reveled in the power of the Chinese consumer. One circulated image depicted Morey as a cartoon character lying awake at night, sleepless after squandering the Chinese market.

"The outpouring of anger from Chinese internet users appears to be real rather than manufactured, with hardly any sign of dissent," said Jessica Chen Weiss, a Cornell University professor who studies Chinese nationalism. "But this chorus of outrage also reflects how effective the Chinese government's messaging and propaganda have been at fanning popular nationalism, depicting the Hong Kong protests as an illegitimate separatist movement and framing the ongoing trade and tech war as a national struggle against foreign aggression."

The outrage coincides with a swell of patriotism from the National Holiday at the start of this month. Nationwide, flags handed out by the government festooned shop entrances and residential buildings. As homework for the weeklong holiday, elementary schoolchildren were assigned to take a photo of themselves standing beside a flag, as well as to write poems about their feelings toward the motherland.

A film called "My People, My Country" depicted seven pivotal moments in the history of the People's Republic, featuring major stars as a fighter jet pilot, an atom bomb scientist, a taxi driver and others who have played roles in China's development. Many Chinese people said they couldn't stop humming the movie's theme, sung by pop idol Faye Wong and played on a loop in many public venues.

Historical events covered in "My People, My Country" included the 2008 Beijing Olympics, the anniversary of the end of the Second Sino-Japanese War, and the 1997 handover, when Hong Kong was returned to China from British rule.

"No force can stop the progress of the Chinese people," Xi said in a televised speech on National Day.

In a country where criticizing the Communist Party invites censorship and even arrest, expressions of love for the nation are a safer and more straightforward bet.

"Online nationalism is an outcome of patriotic education efforts: identification with the Chinese nation has become part of many people's identities, as have the stories of national humiliation at the hands of foreign imperialists and the recent rise to glory," said Florian Schneider, director of the Leiden Asia Centre in the Netherlands.

Schneider added, however, that much like angry online commentary elsewhere in the world, Chinese nationalist sentiments can rapidly fade as people lose steam or other topics vie for their attention.

Fans and companies' eagerness to attack and dismiss the NBA has not gone unquestioned in China. Some online commentators, including the editor-in-chief of the nationalistic Global Times, challenged the fruitfulness of completely disassociating from the NBA.

"Ending co-operation with the NBA does not have to become a kind of trend," said Hu Xijin, who in a separate commentary called patriotism one of China's greatest resources.

J.C. Wang, a 23-year-old sports microblogger in central Henan province, said he hopes young people won't blindly harass Chinese fans and NBA players in the name of patriotism, though he also feels that Morey and the NBA should apologize.

"For a large number of Chinese basketball fans, NBA is already an indispensable part of life," Wang said.

Then he echoed a conviction expressed by many online: "I love basketball and the NBA, but I also know why I can comfortably lie in bed at home and watch the NBA in the first place."

In other words, without China's economic progress, opportunities to enjoy such leisure activities wouldn't even be available. This week, the Communist Party has proven that it can just as swiftly take these luxuries away.

While the pre-season Shanghai game between the Lakers and Nets went ahead as scheduled, it was not broadcast online or aired on state television. No Chinese media outlets reported on the game.

"If no one else around me is watching, (NBA fandom) may just become something that never happened," Wang said.

------

Associated Press researchers Shanshan Wang and Yu Bing in Beijing contributed to this report.