As human rights protesters dogged the Beijing Olympics' torch relay around the world, as supporters of Tibet condemned the violent crackdown in Lhasa, and as Darfur activists demanded change in China's Sudan policy, Chinese young people worked themselves into a different form of righteous anger. In online forums and chat rooms, they blasted Beijing's leaders for not being tougher in Tibet. They agitated for boycotts against Western businesses based in nations that object to Beijing's policies, and they directed venomous fury against anyone critical of China.

The anger has even spread to American college campuses. In April, Chinese students at USC blasted a visiting Tibetan monk with angry questions about Tibet's alleged history of slavery and other controversial topics. When the monk tried to respond, the students chanted, "Stop lying! Stop lying!"

At the University of Washington, hundreds protested outside during a speech by the Dalai Lama, chanting, "Dalai, your smiles charm, your actions harm." When one Chinese student at Duke University tried to mediate between pro-China and pro-Tibet protesters, her photo, labeled "traitor," was posted on the Internet, and her contact information and her parents' address in China were listed for all to see.

The explosion of nationalist sentiment, especially among young people, might seem shocking, but it's been simmering for a long time. In fact, Beijing's leadership, for all its problems, may be less hard-line than China's youth, the country's future. If China ever were to become a truly free political system, it might actually become more, not less, aggressive.

China's youth nationalism tends to explode over sparks like the Tibet unrest. It burst into violent anti-American protests after NATO's accidental bombing of China's embassy in Belgrade, Yugoslavia, in 1999. (Most young Chinese I've met don't believe that the bombing was an accident.) Even after 9/11, a time when the governments of China and the United States were building a closer relationship, some young Chinese welcomed America's pain. "When the planes crashed into the World Trade Center, I really felt very delighted," one student told Chinese pollsters.

Youth nationalism exploded again into anti-Japan riots across China in 2005, after the release of Japanese textbooks deemed offensive in China for their apparent whitewashing of World War II atrocities. During the riots, I was working in Lanzhou, a gritty, medium-sized city in industrial central China. Day after day, young Chinese marched through Lanzhou and looked for shops selling Japanese goods to smash up -- though, of course, these stores were owned by local Chinese merchants.

Hardly uneducated know-nothings, young nationalists tend to be middle-class urbanites. Far more than rural Chinese, who remain mired in poverty, these urbanites have benefited enormously from the country's three decades of economic growth. They also have begun traveling and working abroad. They can see that Shanghai and Beijing are catching up to Western cities, that Chinese multinationals can compete with the West, and they've lost their awe of Western power.

Many middle-aged Chinese intellectuals are astounded by the differences between them and their younger peers. Academics I know, members of the Tiananmen generation, are shocked by some students' disdain for foreigners and, often, disinterest in liberal concepts such as democratization. University students now tend to prefer business-oriented majors to liberal arts-oriented subjects such as political science. The young Chinese interviewed for a story last fall in Time magazine on the country's "Me Generation" barely discussed democracy or political change in their daily lives.

Beijing has long encouraged nationalism. Over the last decade, the government has introduced new school textbooks that focus on past victimization of China by outside powers. The state media, such as the People's Daily, which hosts one of the most strongly nationalist Web forums, also highlight China's perceived mistreatment at the hands of the United States and other powers.

In recent years, too, the Communist Party has opened its membership and perks to young urbanites, cementing the belief that their interests lie with the regime, not with political change -- and that democracy might lead to unrest and instability. According to Minxin Pei of the Carnegie Endowment for International Peace, "The party showers the urban intelligentsia, professionals and private entrepreneurs with economic perks, professional honors and political access." In the 1980s, by contrast, these types of professionals and academics were at the forefront of Tiananmen protests.

The state media also increasingly highlight the problems of rural China -- China now has income inequality on par with many Latin American nations -- suggesting to urbanites the economic and political catastrophe that might befall them if these rural peasants swamped wealthy cities.

Now, though, according to Chinese officials, it appears that the Chinese government actually wants to tamp down nationalism. Some officials privately worry that nationalist protests, even ones targeting other countries, ultimately will transform into unrest against Beijing, like previous outbursts of patriotism in China before communist rule in 1949, which eventually turned into nationwide convulsions.

In 2005, Beijing initially fed the anti-Japan feelings with public statements. Then Beijing -- which depends on Tokyo as a crucial trading partner and source of aid -- tried to tamp down tensions by keeping much of the protest details out of the state media. Ultimately, though, Beijing had to roll out riot-control police in large cities. Similarly, after a 2001 collision between American and Chinese military planes that killed the Chinese pilot, Beijing struggled to keep street protests from erupting into riots.

In the long run, this explosive nationalism calls into question what kind of democracy China could be. Many Chinese academics, for example, believe that, at least in the early going, a freer China might become a more dangerous China. Able to truly express their opinions, young Chinese would be able to put intense pressure on a freer government to adopt a hard line against the West -- even, perhaps, to invade Taiwan. By contrast, the current Chinese regime has launched broad informal contacts with Taiwan's new rulers, including an April meeting between Chinese President Hu Jintao and incoming Taiwanese Vice President Vincent Siew -- contacts denounced by many bloggers. One day, Hu may find even he can't defend himself before a mob of angry Chinese students.