Washington (CNN) A federal judge on Thursday issued an order blocking New York state from turning over President Donald Trump's tax returns to congressional Democrats for now, should the House Ways and Means Committee request them through a newly passed New York law.

The limitation will be in place, Judge Carl Nichols wrote, while allowing New York to challenge whether Nichols' courtroom in Washington is the proper place for this case, brought by Trump, to move forward, and in what form it could proceed.

In a court hearing on Wednesday ahead of the order, Nichols said that his intention was to ensure "Mr. Trump cannot suffer any harm" while arguments play out.

The order is based on a compromise proposal developed by New York that Trump's attorneys told the judge on Wednesday that they could live with.

Nichols is a Trump nominee confirmed by the Senate earlier this year.

Read More