A federal prison in South Texas over the next week will transfer up to 2,800 inmates to other institutions in the area, after a riot on Friday rendered the facility uninhabitable, an official said.

Inmates at the Willacy County Correctional Center, who took control of the prison using pipes as weapons, were compliant on Saturday evening as negotiations with the authorities continued.

Ed Ross, a spokesman for the Federal Bureau of Prisons, said in a phone call that about 2,800 low-security offenders and illegal immigrants will be transferred to other facilities.

“Staff are continuing to communicate with the inmate population in an effort to regain complete control of the facility, which is now uninhabitable due to damage caused by the inmate population,” the bureau said in a statement.