Officers regained control of a South Texas prison where inmates had set fires and caused significant damage after taking over part of the facility, according to the private contractor operating the prison.

More than 300 of the 2,800 inmates were moved Sunday from the Willacy County Correctional Center to other federal facilities, said Issa Arnita, a spokesman for Management & Training Corp., the Utah-based company that runs the prison. The rest will be moved over the next few days.

Arnita declined to say where the inmates would be taken or how long they would remain there, citing security reasons. He did say they would be taken to other federal units in Texas and elsewhere, and he described them as “cooperative” during the transfers.

The inmates are primarily low-level offenders who are immigrants in the country illegally, according to the prison operator. They took control of part of the prison on Friday, complaining about the facility’s conditions and medical services and refusing to complete their work assignments, officials said.

The Valley Morning Star reported that fires were set inside three of the prison’s 10 housing units, and Arnita said in a statement Sunday that extensive damage was done to plumbing and heating and cooling systems. The full extent of the damage was unknown.

Authorities said two corrections officers and three inmates suffered minor injuries.

A spokesman for the U.S. Bureau of Prisons referred questions Sunday to the prison operator, Management & Training Corp.

According to a report last year by the American Civil Liberties Union, the large Kevlar tents that make up the facility are not “only foul, cramped and depressing, but also overcrowded.”

The report said inmates reported that their medical concerns were often ignored by staff and that corners were often cut when it came to health care.

Carl Takei, a staff attorney with the ACLU’s National Prison Project, said the courts have determined that the denial of appropriate medical care amounts to cruel and unusual punishment. Government institutions like the Bureau of Prisons can’t evade their responsibility to provide inmates with proper medical care just by handing control of a prison to a private contractor like MTC, he said.

Takei said problems at the Willacy County prison also include overflowing toilets and sewage that seeps into sleeping areas.

“The unsanitary conditions and overcrowding makes for a tense atmosphere,” he said.

Brian McGiverin, a prisoners’ rights attorney with the Texas Civil Rights Project, said he wasn’t surprised that inadequate medical care could ignite unrest. He said medical care is grossly underfunded in prisons, especially those run by private contractors.

“It’s pretty abysmal with regard to modern standards how people should be treated, pretty much anywhere you go,” he said.

But Arnita said the health services at the Willacy County prison are accredited by independent organizations, including The Joint Commission, a national not-for-profit that accredits more than 20,500 health care entities in the U.S.

“We believe offenders receive timely, quality health care,” he said.