The government announced the mass transfer of inmates with a cleverly produced video posted on social media. It showed prisoners forced to run barefoot and handcuffed up stairs and across the bare floor, wearing only regulation white shorts. They were then forced to sit with their legs locked together in tightly packed groups in cells.

“What, are they saying that the damn dictatorship didn’t give the prisoners tuxedos? Without shoes? Now we are going to take money from children’s hospitals to buy them shoes! What brand do you think they would like?” Bukele wrote.

Gustavo Villatoro, the government’s justice and peace minister, said Wednesday that the suspected gang members would never return to the streets, although some 57,000 of those arrested still await formal charges or trial.

“They will never return to the communities, the neighborhoods, the neighborhoods, the cities of our beloved El Salvador,” Villatoro said.

Only about 3,500 people caught up in the crackdown have been released so far.

Human rights groups say there have been many cases of prisoner abuse and that innocent people have been caught up in police raids.

The local rights group Cristosal documented 3,344 cases of human rights abuses in the first 11 months of the state of emergency. Most of the abuses involved arbitrary arrests; family members say young men are detained based on their appearance or because they live in low-income neighborhoods.

There have also been allegations of inadequate medical treatment in prisons.