China has warned foreign athletes they may face punishment for speech that is "against the Olympic spirit" following a similar warning from human rights activists who worry about public freedoms during the games. 

Yang Shu, deputy director general of international relations for the Beijing Organizing Committee (BOC), issued a clear warning that "Any expression that is in line with the Olympic spirit I’m sure will be protected."

"Any behavior or speech that is against the Olympic spirit, especially against Chinese laws and regulations, are also subject to certain punishment," Yang stressed during a news conference Tuesday. 

Protesters hold protest posters during a protest against Beijing 2022 Winter Olympics by activists of the Tibetan Youth Association in Europe front of the International Olympic Committee (IOC) headquarters in Lausanne, Switzerland, Saturday, Dec. 11, 2021.

Protesters hold protest posters during a protest against Beijing 2022 Winter Olympics by activists of the Tibetan Youth Association in Europe front of the International Olympic Committee (IOC) headquarters in Lausanne, Switzerland, Saturday, Dec. 11, 2021. (Jean-Guy Python/Keystone via AP)

Rule 50 of the International Olympic Committee (IOC) charter states that "No kind of demonstration or political, religious or racial propaganda is permitted in any Olympic sites, venues or other areas," meaning that any political protest is subject to punishment at any of the games.

BEIJING RESIDENTS DISAPPOINTED OLYMPICS WILL BE CLOSED TO PUBLIC

China’s treatment of its Muslim-majority Uyghur people and polices toward Tibet, Hong Kong and Taiwan have come under increased scrutiny ahead of the Olympics. The country’s history of restrictive laws regarding public speech has raised concerns that the Beijing games could see greater punishments as "applicable local law" dictates what punishments any such protest would incur. 

Uyghur

A security person watches from a guard tower around a detention facility in Yarkent County in northwestern China's Xinjiang Uyghur Autonomous Region on March 21, 2021. Four years after Beijing's brutal crackdown on largely Muslim minorities native to Xinjiang, Chinese authorities are dialing back the region's high-tech police state and stepping up tourism. But even as a sense of normality returns, fear remains, hidden but pervasive. (AP Photo/Ng Han Guan)

"Chinese laws are very vague on the crimes they can use to prosecute people’s free speech," Human Rights Watch researcher Yaqiu Wang said, citing potential offenses of provoking trouble or inciting subversion. 

CHINA'S MANDATORY OLYMPICS APP RAISES PRIVACY AND CENSORSHIP CONCERNS, WATCHDOG GROUP WARNS

Individuals who speak out in China face significant punishments: Chinese tennis star Peng Shuai disappeared from public view for two weeks following claims she made on social media platform Weibo that a former Beijing official had sexually assaulted her. 

MELBOURNE, AUSTRALIA - JANUARY 15: Shuai Peng of China reacts in her first round match against Eugene Bouchard of Canada during day two of the 2019 Australian Open at Melbourne Park on January 15, 2019 in Melbourne, Australia.(Photo by Fred Lee/Getty Images)

MELBOURNE, AUSTRALIA - JANUARY 15: Shuai Peng of China reacts in her first round match against Eugene Bouchard of Canada during day two of the 2019 Australian Open at Melbourne Park on January 15, 2019 in Melbourne, Australia.(Photo by Fred Lee/Getty Images) ((Photo by Fred Lee/Getty Images))

Swift public outcry and demands from western media led to a campaign of controlled appearances and media opportunities to show that Peng was "safe," but many believed that her movements and speech remained restricted during these times. 

PUTIN TO HOLD SUMMIT WITH XI AT START OF OLYMPICS IN BEIJING

And a Canadian cybersecurity group Citizen Lab reported Tuesday that the health-tracking smartphone app attendees must download has security flaws that included a list of political keywords and a feature to report "politically sensitive content." 

A member of the BOC said the group was "not aware" of the list and would look into the matter, The Washington Post reported. 

CLICK HERE TO GET THE FOX NEWS APP

Zhao Lijian, a Foreign Ministry spokesman, also dismissed concerns that some countries, including the United States, advised athletes to bring burner phones with them to avoid surveillance by the Chinese government. 

Zhao said that countries "guilty of the charge themselves are accusing the innocent party without any evidence." 

The Associated Press contributed to this report.