A federal judge ordered New York state authorities Thursday to take no action, for the time being, on turning over President Donald Trump’s state tax returns if they’re requested by Congress.

U.S. District Court Judge Carl Nichols of the District of Columbia agreed with the president's lawyers, who said if they waited to take legal action until after the tax returns were turned over, it would be too late to challenge the state law because the tax documents would have already been made public.

“We look forward to continuing to make our case in court. This law is constitutional, and we will vigorously defend it,” said Letitia James, New York's attorney general.

The judge set arguments on the issue for Aug. 29.

The House Ways and Means Committee has been trying since April to get access to the president's federal tax returns, citing a federal law that allows inspection of the documents to verify that the IRS is properly auditing a president's returns. But the Treasury Department denied the request, saying that it served no legitimate legislative purpose.

In light of that stalemate, the New York Legislature passed a law, signed by Gov. Andrew Cuomo on July 8, that requires tax authorities in the state to provide the returns filed by certain government officials, including the president, if a requesting congressional committee has already asked for the returns from the Treasury Department.

Trump's lawyers filed a lawsuit in late July challenging the law, claiming that examining an official's state returns would shed no light on how the IRS audits federal returns. The lawsuit accused the state of passing the law "to discriminate and retaliate against President Trump for his speech and politics." The president's lawyers asked the judge for an order blocking Congress from asking New York for the state tax returns.

Thursday's order forbids New York officials from delivering any of Trump's returns to the House Ways and Means Committee and directed them to notify him if any requests for the documents are received from Congress.