WASHINGTON (Reuters) - A federal judge has ordered the Trump administration to give the American Civil Liberties Union (ACLU) access to an American suspected of fighting for Islamic State and held in secret U.S. military detention in Iraq for more than three months.

In a ruling issued late on Saturday, U.S. District Court Judge Tanya Chutkan denied a government request to dismiss an ACLU challenge to the unidentified man's detention, rejecting the claim that the organization has no standing in the matter.

Chutkan ruled that the Defense Department should provide the ACLU with "temporary, immediate and unmonitored access" to the man to determine if he wants the organization to pursue a habeas corpus petition on his behalf and provide him with legal advice.

Using such a petition, a person can ask a court to review the legality of their detention.

The man surrendered in mid-September to U.S.-backed Syrian Kurdish fighters pursuing an offensive against Islamic State’s former stronghold of Raqqa, in northeaster Syria. He was turned over to the U.S. military, which classified him as an "enemy combatant," and transferred him to a secret location in Iraq, according to Chutkan's ruling.

Aside from two visits by the International Committee of the Red Cross, the detainee has had contact only with U.S. government officials, according to the ruling.

The judge pointed out that in a Nov. 30 brief, the Defense Department disclosed that in an interview with FBI agents, the detainee said that he felt that he wanted an attorney present.

Chutkan dismissed as "disingenuous at best" a Pentagon argument that the ACLU has no standing in the case because it has been unable to confer or meet with the detainee, and cannot prove that detainee wants the group to pursue a habeas corpus petition on his behalf.

The Defense Department is "the sole impediment" to the ACLU's access to the detainee, the judge said.

She also called "remarkable and troubling" the Pentagon’s contention that the detainee's request for a lawyer should be ignored until it decides what to do with him and when he should be given access to an attorney.

Chutkan barred the Defense Department from transferring the detainee to another location before the ACLU can interview him and then inform the court of his wishes.

(Reporting by Jonathan Landay; Editing by Phil Berlowitz)