A Chinese student who praised the "fresh air of free speech" in the U.S. during her commencement address at the University of Maryland is facing an online backlash from classmates and from people in China who say she insulted her own country.

Shuping Yang, who graduated with a double-major in psychology and theater, is from the city of Kunming in southwest China. As she prepared to speak on Sunday, her mother waved a bouquet of flowers at her from the audience.

China has nearly 330,000 students in the U.S., far and away the largest contingent of any country. Yang's speech is one of a number of events that have caused acrimonious political debates among them.

Yang told the assembly that pollution was so bad in her hometown that she had to wear face masks to keep from getting sick.

She also described the evolution of her political views, saying that she once believed that "only authorities control the narrative, only authorities could define the truth." She recalled being inspired by the sight of her classmates joining political protests, leading her to the conclusion that "freedom is oxygen."

In the comments on the YouTube video of the speech, some critics accused Yang of exaggerating China's problems, pointing out that Kunming is one of China's less polluted cities.

Others accused her of fawning over Americans. And some suggested she was not welcome to return to China.

One user with the handle Vivi Yingying on Weibo, China's main microblog platform, said of Yang's speech: "You reaped their [the audience's] applause, but you lost other people's respect."

Others sprang to her defense. "She pointed out the vexation that China's pollution and freedom of speech issues cause her. She's not wrong," said another Weibo user, Ji Xuguang.

The incident is reminiscent of controversies like what happened at Duke University in 2008, when student Grace Wang was assailed by critics for trying to mediate between pro-Tibetan demonstrators and Chinese students ahead of the Beijing Olympics.

In many of these episodes, Chinese critics seem less outraged by the actual content of any speech than the fact that their country's "dirty laundry" is being aired in front of outsiders.

Yang issued an apology on Weibo in which she said she "deeply loves her motherland" and intended only "to share her experience of studying overseas, not to negate or denigrate my country or my hometown."

She promised to use her education to promote Chinese culture, adding that she hoped ad hominem attacks on her would end.

In a statement on its website, the University of Maryland said it "proudly supports Shuping's right to share her views and her unique perspectives."

Some Chinese students from UMD released a video rebutting some of Yang's remarks. The theme of the video, according to the state-run Global Times tabloid, was "I have different views from Shuping Yang. I am proud of China."

The newspaper added that the official China Students and Scholars Association encouraged the students to speak in the video. Branches of the CSSA in U.S. universities and colleges describe themselves as organizations approved by the Chinese Embassy in the U.S. Critics see them as an arm of China's government.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.