MCALLEN, Texas — Approximately 2,000 inmates at a federal detention center near the border that primarily houses immigration detainees rioted and set off fires, requiring a massive mobilization of law enforcement to secure the perimeter and restore order.

The uprising began Friday morning at the MTC Detention Center in Raymondville when a group of prisoners began getting agitated about the medical services in the private prison facility, KGBT reported.

The inmates broke out of the housing area and made their way into the recreational yard, prompting a lockdown of the prison. KGBT reported that the inmates set off fires in three separate units of the facility. They also tore down some of the tents used for their housing and shook the perimeter fence as they chanted their grievances.

Tear gas was used in an attempt to break up the rioting. Federal, state and local law enforcement swarmed to the facility, setting up a perimeter around the prison as authorities worked to regain order inside.

The facility is run by MTC, a private company that is under contract with the U.S. Federal Bureau of Prisons (BOP). The BOP lists the number of detainees at 2,881, with the population being made up primarily of immigration detainees.

The detention center is located in Raymondville, about 40 miles north of the border city of Brownsville, and is near two other detention facilities, as well as being right across the street from the Willacy Sheriff’s Office. Sheriff’s deputies were seen guarding the perimeter of the facility.

As a precautionary measure, school officials in Willacy County placed three of their schools in a soft lockdown as the situation unfolded.

As of press time, authorities still had not released any information regarding possible casualties, among either the inmates or law enforcement.

Near the Texas border, private prisons are used to house federal inmates who are in detention awaiting trial for offenses ranging from immigration violations to drug trafficking and human smuggling.

Follow Ildefonso Ortiz on Twitter and on Facebook.