WASHINGTON — A federal judge blocked the Trump administration on Thursday from transferring an American citizen detainee — who has already been held in Iraq as a suspected Islamic State member for seven months — to the custody of another country against his will.

The decision, by Judge Tanya S. Chutkan, of the Federal District Court for the District of Columbia, was a significant ruling in a case that has raised novel questions about national security and individual rights. It was also a milestone in the unusual case of the man, whose name has not been made public, and which will now most likely go before a federal appeals court.

The man was captured by a Syrian militia in September and turned over to the American military. This week, the government notified the man that it intended to transfer him to another country, but he has decided to fight that plan in court.

While that country’s name has been redacted as classified in court filings, the man is also a citizen of Saudi Arabia. Officials familiar with his case have said the Trump administration decided to ask Saudi Arabia to take custody of him after concluding that there was insufficient courtroom-admissible evidence to prosecute him.