A federal judge has ordered the remote detention camp in the Florida Everglades known as "Alligator Alcatraz" to stop taking detainees and remove infrastructure added to the original airport site. US District Judge Kathleen Williams issued the preliminary injunction in a federal lawsuit filed by environmental groups and a Native American tribe who are concerned about the impact the facility will have on the environmentally sensitive area. The order mandates no detainees beyond those currently housed at the facility can be moved there. "The project creates irreparable harm in the form of habitat loss and increased mortality to endangered species in the area," Williams said in the order. Lighting, fencing and "generators, gas, sewage, and other waste and waste receptacles that were installed to support this project" and added to Collier Dade Training and Transition Airport must be removed within 60 days of the order, Williams said, effectively shutting the facility that's become a centerpiece of the Trump administration'simmigration crackdown– whichAmericans largely oppose. A preliminary injunction is a temporary order put in place until a court can make a final decision in a case. The state will appeal the judge's order, a spokesperson for the Florida attorney general said in apost on X. "The deportations will continue until morale improves," Gov. Ron DeSantis' spokesperson, Alex Lanfranconi, told CNN. Deep in the marshy wetlands of the Everglades, "Alligator Alcatraz" has been mired incontroversy, withlawmakerswho toured the site describing hundreds of migrants confined in cages amid sweltering heat, bug infestations and meager meals. The state did not properly assess the consequences of converting the airstrip into a detention facility, the judge found, adding it "consulted with no stakeholders or experts and did no evaluation of the environmental risks." "Every Florida governor, every Florida senator, and countless local and national political figures, including presidents, have publicly pledged their unequivocal support for the restoration, conservation, and protection of the Everglades. This Order does nothing more than uphold the basic requirements of legislation designed to fulfill those promises," Williams said. "We are so relieved, Elise Pautler Bennett, an attorney with one of the environmental groups that brought the lawsuit, said in a statement. "We feel we presented voluminous evidence that is presented in her (Williams') order showing this was the right decision to protect the environment and the interest of Americans in the everglades." Department of Homeland Security Assistant Secretary Tricia McLaughlin condemned Williams' ruling as an attempt to derail the Trump administration's immigration crackdown efforts. "This ruling from an activist judge ignores the fact that this land has already been developed for a decade. It is another attempt to prevent the President from fulfilling the American people's mandate to remove the worst of the worst including gang members, murderers, pedophiles, terrorists, and rapists from our country," McLaughlin said in a statement. Williams was nominated by former President Barack Obama. Who oversees the detention center – whether it's the federal government or the state of Florida – also has been a key issue in the battle over its future. The lack of clarity around who holds the ultimate responsibility for the facility raises concerns about accountability and oversight, critics argue. Florida says it's operating the temporary detention camp under agreements between state and local agencies and US Immigration and Customs Enforcement. But when it comes to day-to-day operations at the facility, and to decisions about who's detained there, federal officials have said the state is in charge. In her order, Williams said, "the project was requested by the federal government; built with a promise of full federal funding … staffed by deputized ICE Task Force Officers," and added, "If it walks like a duck, quacks like a duck, and looks like a duck, then it's a duck." The facility is surrounded by Everglades National Park, Big Cypress National Preserve and the tribal lands of the Miccosukee Tribe of Indians of Florida, a plaintiff in the case. "This is not our first fight for our land and rights," Talbert Cypress, the chairman of the tribe, said in a news release. "We will always stand up for our culture, our sovereignty, and for the Everglades." The hastily built detention center is about an hour's drive west of Miami. During a tour of the facility before its opening, Florida Gov. Ron DeSantis stressed it was both temporary and necessary to alleviate the burdens on the state's law enforcement agencies and jails, which he said were seeing an influx of migrants. It is built on an airstrip and includes repurposed FEMA trailers and tents, surrounded by a fence. "Opening up the Everglades was a political decision, not a policy one," Democratic state Rep. Anna Eskamani, who toured the facility in July and testified in the case, said during a Friday news conference. Friends of the Everglades, another plaintiff in the case, was founded to oppose construction on the very same spot in 1969, Eve Samples, the group's executive director, told CNN. US Rep. Frederica Wilson, a Democrat from Florida, celebrated the ruling, sayingon X"it's about damn time!" "It was cruel, careless, and destructive from the start and should have never been built," added Wilson, who represents South Florida's 24th congressional district. "I'm glad it's closing, and we must never repeat the mistakes made at this facility anywhere else!" The lawsuit against the facility is one of two working its way through the federal court system. Asecond lawsuitfocuses on legal access for those detained at the facility. CNN has reached out to the Florida Division of Emergency Management for comment on the judge's order. This story has been updated with additional information. CNN's Catherine E. Shoichet contributed to this report. For more CNN news and newsletters create an account atCNN.com