Thousands of undocumented immigrants have been quarantined because of mumps and chicken pox outbreaks in several U.S. detention centers.

Since September, U.S. immigration officials have quarantined 5,200 adult migrants due to ongoing disease outbreaks at detention centers nationwide, according to CNN. Often, that means people are blocked from seeing visitors, but in certain circumstances quarantines have also curtailed immigrants’ access to legal aid.

U.S. Immigration and Customs Enforcement said Thursday that thousands of detainees across 39 detention centers have been exposed to mumps or the chickenpox — two highly contagious illnesses that can be prevented with a vaccine — while at least 100 migrants have been exposed to both illnesses, according to CNN. Unvaccinated and exposed people are quarantined regardless of whether they’re actually sick to avoid the spread of the disease. Only 297 detainees have come down with mumps so far.

On March 7, however, immigration officials confirmed 2,287 detainees were in quarantine. That means more than twice as many people are now being blocked from critical services until the outbreaks die down. In part, the outbreak could be attributed to the influx of Central American migrants streaming across the southern border, many of them seeking asylum. Detention centers have become overcrowded.

“It’s not surprising that when you have people stacked on top of each other like sardines, when an outbreak does start, it’s going to rip through one of these facilities like wildfire,” Simon Sandoval-Moshenberg, of the Legal Aid Justice Center, told WVTF in Virginia. There are 24 confirmed or suspected mumps cases at a detention facility in Farmville.

Mumps has an incubation period of 12 to 25 days.

In March, lawyers for 17 immigrants detained in the Pine Prairie Immigration and Customs Enforcement Processing Center in Louisiana said their clients were blocked from their attorneys for two weeks during a quarantine regarding mumps — though immigration court proceedings continued. Quarantined detainees were also blocked from the library, where they might access translations and paperwork for detention proceedings. The Louisiana facility is privately owned, and individual facilities are able to set their own protocols for handling quarantines.

Similarly, the Denver Contract Detention Facility in Colorado — also operated by a for-profit company — has had multiple chickenpox outbreaks and several cases of mumps. Colorado Rep. Jason Crow argued that the facility has only one physician to treat its 1,600-plus detainees. And a jail contracting with ICE in Bergen County, New Jersey, has been placed under quarantine due to mumps. There have been at least 167 mumps cases confirmed in Texas immigration detention facilities this year alone, according to Houston Public Media.

“We should be vaccinating all at-risk people as early as possible, particularly if we are about to confine them in a closed space with a bunch of other unvaccinated people in the setting of an outbreak. This is ridiculous,” said Jody Rich, professor of Medicine and Epidemiology at Brown University and a volunteer with Physicians for Human Rights, told Houston Public Media in May.