HONG KONG — The slight teenager with heavy rectangular glasses and a bowl cut stood above the ocean of protesters who had engulfed downtown Hong Kong. His deep voice was drowned out by cheers, but the crowd did not mind: They knew him and his message. It was Joshua Wong, a 17-year-old student activist who has been at the center of the democracy movement that has rattled the Chinese government’s hold on this city.

“When I heard the national anthem starting to play, I certainly did not feel moved so much as angry,” Mr. Wong said a few hours later, after a protest at a flag-raising ceremony on Wednesday morning to mark the Chinese National Day holiday. “When it tells you, ‘Arise! All those who refuse to be slaves!’ — why is our treatment today any different from the slaves?”

Mr. Wong emerged as a figure in Hong Kong’s activist circles two years ago, when he rallied students against a government plan to introduce “patriotic education” in schools, attacking it as a means of Chinese Communist Party indoctrination. He played a pivotal role in setting off the demonstrations of the past week, leading a surprise charge on a government building that resulted in his arrest and prompted thousands to take to the streets ahead of schedule. Local newspapers with close ties to Beijing have sought to smear him as a tool of the United States.

In reality, Mr. Wong is troubling confirmation for the authorities that the first generation in Hong Kong to grow up under Chinese rule is by many measures also the one most alienated from Beijing’s influence. He was born less than nine months before this former British colony’s handover to China in 1997, and raised here at a time when the party has tried mightily to win over the people and shape them into patriotic Chinese citizens.