Armed riot police in China paraded four alleged violators of coronavirus restrictions through the streets in an effort to shame them, sparking criticism on social media.

The alleged violators, accused of trafficking illegal migrants in violation of China’s coronavirus lockdowns, were marched through the streets in the Guangxi region's Jingxi city, according to France 24.

HONG KONG COURT DENIES BAIL TO PRO-DEMOCRACY EDITORS CHARGED WITH SEDITION

Chinese President Xi Jinping, also general secretary of the Communist Party of China Central Committee and chairman of the Central Military Commission. Xi is said to be China's most authoritarian leader in decades. 

Chinese President Xi Jinping, also general secretary of the Communist Party of China Central Committee and chairman of the Central Military Commission. Xi is said to be China's most authoritarian leader in decades.  (Wang Ye/Xinhua via Getty Images)

Videos of the incident circulated on social media prompting many to criticize China’s practice of shaming lawbreakers.

CHINESE COMMUNIST PARTY, LEFTIST AMERICAN ELITES 'ARE ONE AND THE SAME': DOMENECH

"Shame parades are bad practice used in the turbulent period which caused great damage to the country and the people,"one online commenter wrote, according to South China Morning Post.

"What is more terrifying than parading the street is the many comments that support this approach," another user wrote. 

Medical Technologist Erika Alvarado performs a COVID-19 test on a patient who just delivered a baby outside a hospital in Manila, Philippines on Friday, Dec. 24, 2021.

Medical Technologist Erika Alvarado performs a COVID-19 test on a patient who just delivered a baby outside a hospital in Manila, Philippines on Friday, Dec. 24, 2021. (AP Photo/Aaron Favila)

The local Chinese government defended the public shaming and claimed it was an "on-site disciplinary warning activity" and no "inappropriateness" occurred, the BBC reported.

The public shaming in China's southern region comes a week after the country announced a massive lockdown in the north as the country prepares to host the Olympics.

China ordered the lockdown of as many as 13 million people in neighborhoods and workplaces in the northern city of Xi’an following a spike in coronavirus cases, setting off panic buying just weeks before the country hosts the Winter Olympic Games.

CLICK HERE TO GET THE FOX NEWS APP

State media reported that city officials ordered all residents to stay home unless they had a pressing reason to go out and suspended all transport to and from the city apart from special cases.

One person from each household will be permitted out every two days to buy household necessities, the order said. It took effect at midnight Wednesday, with no word on when it might be lifted.

MIAMI, FLORIDA - DECEMBER 23: Travelers make their way through Miami International Airport on December 23, 2021 in Miami, Florida. AAA estimates that over 109 million Americans will be traveling 50 miles or more during the holiday season between Dec. 23 and Jan. 2, an increase of 27.7% from 2020. 

MIAMI, FLORIDA - DECEMBER 23: Travelers make their way through Miami International Airport on December 23, 2021 in Miami, Florida. AAA estimates that over 109 million Americans will be traveling 50 miles or more during the holiday season between Dec. 23 and Jan. 2, an increase of 27.7% from 2020.  (Photo by Joe Raedle/Getty Images)

There was no word on whether the virus was the newly surging omicron variant or the far more common delta. China says it has recorded just seven omicron cases — four in the southern manufacturing center of Guangzhou, two in the southern city of Changsha, and one in the northern port of Tianjin.

Associated Press contributed to this report