(CNN) A federal judge ruled Tuesday evening that the Defense Department must provide 72 hours' notice to the attorneys for a US citizen accused of fighting for ISIS and detained in Iraq as an "enemy combatant" if it intends to transfer him to the custody of a third country before his detention challenge at the court is resolved.

The ruling, by Judge Tanya S. Chutkan of the US District Court for the District of Columbia, is a compromise that would allow the detainee's attorneys to file an emergency motion contesting the transfer if the government did give notice of its intention.

The American Civil Liberties Union, which is representing the unnamed man, has filed a petition for habeas corpus, challenging the legality of his detention by the US government. The detainee, described by the US government as a citizen of both the United States and Saudi Arabia, was turned over to US forces in Syria in September by the Syrian Democratic Forces and taken to Iraq. He has since been held in Iraq under US custody.

The US government accuses him of fighting on behalf of ISIS in Syria.

Read More