A federal court held on Monday that it would not prevent New York County District Attorney Cyrus Vance Jr. from enforcing a subpoena seeking various financial documents from President Trump’s accounting firm, including eight years of Trump’s tax returns dating back to January 2011.

To avoid the subpoena, Trump made what Judge Victor Marrero describes as an “extraordinary claim” that “the person who serves as President, while in office, enjoys absolute immunity from criminal process of any kind.”

Marrero rejected this argument — which is good news for Vance, who is seeking the financial records as part of a grand jury investigation encompassing Trump, the Trump Organization and possibly others — and for anyone hoping to someday get a window into Trump’s finances.

The bad news is that Marrero is merely a trial judge, and this case still needs to be heard by a federal appeals court and, quite possibly, by the Supreme Court. Trump’s lawyers have already appealed Marrero’s decision, and they’ve already indicated that they will seek a stay from the United States Court of Appeals for the Second Circuit.

Marrero’s opinion in Trump v. Vance rests on a doctrine known as “Younger abstention,” which prevents federal courts from interfering with an ongoing prosecution in state court. The court held that Vance’s investigation constitutes an ongoing state prosecution. After reaching this conclusion, however, Marrero also spends much of his opinion explaining why Trump’s broad claim of immunity would be untenable regardless.

Trump’s claim that he is immune from investigation is especially weak because Vance seeks documents that are unrelated to Trump’s conduct in office.

As the Supreme Court explained in Clinton v. Jones (1997), “it is settled law that the separation-of-powers doctrine does not bar every exercise of jurisdiction over the President of the United States.” Indeed, Jones drew a distinction between the broad immunity presidents sometimes enjoy when their official actions are challenged in court, and a president’s “unofficial conduct.”

In the Supreme Court’s words, “we have never suggested that the President, or any other official, has an immunity that extends beyond the scope of any action taken in an official capacity.”

Thus, Trump’s claim of immunity is weak. As Marrero writes, the president’s interest in keeping documents secret “that largely relate to a time before he assumed office, and that may involve unlawful conduct by third persons and possibly the President, is far outweighed by the interests of state law enforcement officers and the federal courts in ensuring the full, fair, and effective administration of justice.”

This isn’t the only ongoing legal attempt to get Trump’s financial documents. Last May, federal Judge Amit Mehta rejected an attempt by Trump’s attorneys to keep the president’s accounting firm from turning similar financial records over to the House Oversight Committee. But that case has been bottled up in an appeals court ever since, and the House committee’s subpoena remains in limbo.

Trump’s legal arguments in that case, Trump v. Committee on Oversight and Reform, are exceedingly weak. And it is likely that the House committee will eventually prevail. But it is far from clear that the subpoena will be enforced any time soon — or before the election.

Likewise, Judge Marrero’s decision in Vance is not good news for Trump, but it is merely one step along a lengthy legal journey.