NEW YORK ― Rudy Giuliani, the former New York mayor and campaign surrogate for President Donald Trump, told a federal judge on Monday that he played no role in Trump’s executive order banning Muslim travelers, apparently contradicting his prior statements.

Giuliani’s words have been cited by courts as evidence that Trump intended to target members of a particular religion with his travel ban, a conclusion that has led judges to block the federal government from enforcing it nationwide.

A day after Trump issued the first version of the ban, Giuliani said on Fox News that the president had asked him to put a commission together and look for ways to make the executive order legal.

“What we did was we focused on ― instead of religion ― danger,” Giuliani said at the time. “The areas of the world that create danger for us, which is a factual basis, not a religious basis. Perfectly legal, perfectly sensible, and that’s what the ban is based on.”

“Neither I nor my firm has represented the Trump Administration,” Giuliani wrote in the filing, which was submitted as part of an unrelated dispute over his legal representation of a Turkish gold trader accused of violating sanctions against Iran.

For clarity, I have not participated in writing any of the executive orders on that subject issued by the Trump Administration. Rudy Giuliani

“In particular, I have not served on any Trump administration Commission relating to the so-called Muslim Ban Executive Orders,” read the affidavit. “For clarity, I have not participated in writing any of the executive orders on that subject issued by the Trump Administration.”

Giuliani’s filing appears carefully worded to suggest that his involvement, if any, was ad-hoc and not part of official government acts. The affidavit was first reported by the New York Law Journal.

Earlier this month, a federal judge in Michigan ordered the Trump administration to turn over a memorandum that Giuliani is believed to have produced to help make the travel ban a reality. The judge in that case gave the government until last Friday to come up with the memo, but the Department of Justice refused to provide it, claiming the document request was premature and overly broad.

“The memo will help shed light on the intentions behind the President’s Executive Order,” Nabih Ayad of the Arab American Civil Rights League, which is suing over the travel ban, said in a statement. “And if those intentions support the public statements that Mr. Giuliani made about looking for a legal explanation for a ban on Muslims, the court needs to know this.”

In addition to that ongoing dispute, two federal appeals courts are expected to rule soon on whether to lift national injunctions that have stopped Trump’s travel order from being enforced.