A US federal court judge ordered a temporary reprieve on Friday to the Trump administration’s proposal to deport eight migrants to war-torn South Sudan, allowing time for their lawyers to present their case in a Massachusetts court.

US District Judge Randolph Moss in Washington delivered the unusual Independence Day decision in an emergency hearing, granting the temporary stay until 4:30 p.m. ET, just hours ahead of the migrants’ planned departure on a 7 p.m. flight. The migrants had filed new legal arguments on Thursday after a US Supreme Court decision brought to an end a Boston judge’s authority to hold them.

The men have been detained for six weeks at a US military base in Djibouti rather than being returned to America. The Department of Homeland Security states the group contains people who have committed serious crimes, among them murder.

Their attorneys contend that deporting them to South Sudan a country ravaged by bloodshed and instability is against constitutional safeguards against “cruel and unusual punishment.” The US State Department already warns citizens not to travel to South Sudan because of active armed conflict and criminal-related violence.

Throughout the hearing, Judge Moss recognized the seriousness of the issue and asserted that the US government cannot knowingly put individuals in harm’s way as a means of retribution or deterrence. “It seems to me almost self-evident that the US government cannot take human beings and send them to circumstances in which their physical well-being is at risk,” Moss said.

The migrants from Vietnam, Sudan, Burma, Mexico, Laos, and Cuba are resisting removal based on new legal arguments. While Moss is sending the case to Massachusetts, he did mention that the migrants arguments might hold water if substantiated.

The lawsuit raises the larger controversy over the administration’s deportation policies and deals to resettle migrants in third nations.