HONG KONG — They are sitting in orderly rows, wearing neatly pressed uniforms. But in this class, as they debate the merits of democracy and civil rights, Hong Kong high school students are prompting Beijing to worry that they are increasingly out of control.

The mandatory civics course known here as liberal studies has been a hallmark of the curriculum in Hong Kong for years, and students and teachers say the point is to make better citizens who are more engaged with society.

But mainland Chinese officials and pro-Beijing supporters say the prominence of the city’s youth at recent mass protests is the clearest sign yet that this tradition of academic freedom has gone too far, giving rise to a generation of rebels.

“The liberal studies curriculum is a failure,” Tung Chee-hwa, a former leader of Hong Kong, said in July. “It is one of the reasons behind the youth’s problems today.”