In its filing, Mr. Trump’s own Justice Department did not say whether it agreed with his position that presidents cannot be investigated. But citing “significant constitutional issues” raised by the president’s lawyers, the department said the court should stop enforcement of the subpoena while it takes time to consider the case.

The Justice Department is not part of the case but had told the judge it wanted to offer an opinion because of the importance of the constitutional questions.

The department’s lawyers argued in the filing that a delay would not hurt Mr. Vance’s investigation but would prevent the “irreparable harm” they argued the president would suffer if he had to comply with the demand to turn over his tax returns and other financial information before his case was considered.

A spokesman for Mr. Vance declined to comment.

Mr. Vance’s office has been examining whether any New York State laws were broken when Mr. Trump and his company reimbursed Michael D. Cohen, the president’s former lawyer and fixer, for payments he made to Ms. Daniels, who said she had an affair with the president. Mr. Trump has denied an affair.

The subpoena, which demanded Mr. Trump’s personal and corporate returns dating to 2011, was sent by the district attorney’s office to the president’s accounting firm, Mazars USA, not to Mr. Trump himself. But his lawyers have argued the difference is immaterial. They sued last month to block the subpoena, arguing that a sitting president could not be “investigated, indicted or otherwise subjected to criminal process.”