A Supreme Court showdown over the breadth of Trump’s presidential power is brewing — and it has nothing to do with impeachment. Over the past few months, the president has been locked in separate legal battles with New York state prosecutors and House Democrats over whether eight years of his tax returns must be released.

The outcome of these cases will have huge consequences, too — not just for Trump, but for the contours of executive branch power more broadly. That’s because Trump’s lawyers have asked the highest court in the country to weigh in and rule that as president, Trump is immune from all criminal proceedings and investigations and from Congress’s request for his tax returns. Last week, the justices issued an emergency stay, temporarily preventing the returns from being released to Congress, and soon they’ll decide whether to add one or both cases to this year’s docket — which would mean they’d be decided by June 2020, in the heat of an election year.

So will the Supreme Court end this hunt for Trump’s tax returns, that holy grail of the president’s opponents, and deliver a massive victory for proponents of Trump’s expansive vision of executive power? Or will they rule that Trump must comply with the subpoenas, and at long last, release his closely guarded tax returns? For those who have been distracted from these cases by the recent flood of impeachment news, here’s a quick and dirty primer about the politically explosive legal conundrum that just landed at the justices’ doorstep.

Why do New York state prosecutors want Trump’s tax returns?

Trump may have once loved New York, but since he launched his run for the presidency, New York has not loved him back. As I wrote at the beginning of the year, prosecutors in the president’s home state have always posed one of Trump’s biggest legal threats. That’s because they have legal jurisdiction over his businesses, which they exercised in September when the Manhattan district attorney’s office issued subpoenas to Mazars USA, Trump’s accounting firm, for eight years of Trump’s tax returns.

As for why New York state prosecutors are suing for Trump’s tax returns, it’s part of a broader criminal investigation into Trump and his family business’s role in hush-money payments made to keep multiple women from sharing allegations of their affairs with Trump before the 2016 election. Both Trump and his company reimbursed Trump’s former lawyer, Michael Cohen, for one $130,000 payment, and New York prosecutors are now exploring whether that reimbursement violated any state laws — including whether the expense was falsely accounted for. It’s not entirely clear how Trump’s tax returns fit in, but they could perhaps help illuminate if a crime like bank fraud was committed. Prosecutors have also emphasized in legal filings that the tax returns aren’t related to Trump’s work as president and therefore should not be subject to presidential immunity.

Why does Congress want Trump’s tax returns?

But New York prosecutors aren’t the only ones who want Trump’s tax returns. In April, the House Oversight Committee also issued a subpoena directing Mazars USA to turn over eight years of Trump’s tax returns. Their justification was different than New York’s. In their subpoena, House Democrats said that the documents were necessary for their constitutional oversight duties, including investigations of Trump and his businesses.

Cohen makes an appearance in this story, too, with his congressional testimony in February galvanizing Congress’s request. In his testimony, Cohen claimed that Trump had exaggerated his wealth in some cases and downplayed it in others. House Democrats say they want to investigate those allegations — and that they need Trump’s financial records to do so.

What is Trump’s legal argument?

In many of the legal disputes swirling around Trump, he’s leaned on a bold defense: The chief executive is immune to all investigations — whether they’re criminal, civil, or congressional — as long as he’s in the White House.

In the New York case, his personal lawyers have claimed that as president, Trump can’t be touched by any part of the criminal process. Trump’s lawyer even went as far to argue that if the president shot someone while in office, local authorities wouldn’t be able to act. But they’ve also argued that even if that broader argument doesn’t hold, state courts don’t have the constitutional authority to criminally investigate or prosecute the president. That’s not an issue the Supreme Court has ruled on directly before, although that doesn’t mean the justices will embrace Trump’s argument.

In the House case, Trump’s argument is also quite sweeping. His attorneys have contended that Congress doesn’t actually need the records for legislation, making their request invalid.

And what have lower courts said about it?

Trump and his lawyers are going into their Supreme Court battle with very little support from the lower courts. Two trial court judges and two federal appeals court panels all rejected Trump’s arguments and ruled that his accounting firm needs to turn over the tax returns to New York prosecutors and the House Oversight Committee.

In the case involving the New York prosecutors, the lower court judge didn’t mince words about Trump’s argument. He wrote that the idea that the president couldn’t be touched by the criminal justice system was “repugnant to the nation’s governmental structure and constitutional values.” The appeals court above him ruled against Trump as well, but on more narrow grounds, punting on the broader questions of presidential immunity, although they still made clear that they still disagreed with the broader argument.

Meanwhile in the cases involving Congress, the lower court rejected Trump’s argument that the House Oversight Committee’s subpoenas have no legitimate purpose, writing that it is “not fathomable” that Congress wouldn’t have the authority to investigate potentially illegal conduct by the president if it has the power to remove a president from office through impeachment. However, on appeal, one judge disagreed with that assessment, saying that if Congress wanted to investigate the president, it should do so under the auspices of an impeachment inquiry, not routine oversight. But the other two appellate judges wrote that the subpoena falls squarely within Congress’s oversight authority, and ultimately, the full appeals court declined to revisit the case.

Does that tell us how the Supreme Court will respond?

Trump is certainly not the first president to argue that his role as commander in chief shields him from some aspect of the legal process. But the Supreme Court has never ruled that presidents are beyond the reach of the courts — in fact, as the Watergate scandal unfolded, the justices said President Nixon had to comply with a subpoena directing him to turn over tapes of White House conversations. And in 1997, the court again ruled that the president doesn’t have immunity from federal lawsuits on issues that transpired prior to assuming the presidency.

All of that would suggest that Trump will run into some stiff headwinds at the Supreme Court, which could simply refuse to hear the cases and allow the lower court rulings to stand. On the other hand, Trump is also arguing in a separate case that while presidents might not be immune from federal lawsuits, state lawsuits are a different matter, so the extent to which the chief executive can be touched by state courts is an issue the Supreme Court may want to address.

Some legal experts have noted, too, that the dissent in the case involving the congressional subpoena, which argued that investigations can only take place under the auspices of an impeachment inquiry, could serve as a roadmap for some of the conservative justices, by offering a narrower path for blocking the subpoena without rubber-stamping Trump’s more sweeping arguments about presidential immunity.

What are the stakes for Trump?

If Trump loses at the Supreme Court, his accounting firm has said it will comply with the subpoenas. That’s potential trouble for Trump on two fronts, depending on what’s in the much-coveted returns. If there is evidence that he broke a New York law, state prosecutors could try to charge him with a crime even while he’s still in the White House. That, of course, would trigger another constitutional showdown, but prosecutors could also go after members of Trump’s family who are involved in the running of his business if they don’t want to tangle directly with the president. Meanwhile, Congress can’t launch a criminal investigation, but House Democrats could still comb through the tax returns to find potential political weapons against Trump.

If the Supreme Court sides with Trump, what would that mean for future presidents?

Trump’s attempts to stretch the boundaries of presidential immunity could have significant reverberations down the line, depending on how the court responds. The justices might not want to sign onto his most expansive arguments, like the one that a president is completely untouchable by prosecutors, because they are so extreme. But even a more limited ruling — one, let’s say, that says Congress can only investigate presidential wrongdoing within the context of an impeachment inquiry — could have significant implications for the balance of power between the White House and Congress. After all, this isn’t just a fight about Trump’s tax returns — it’s about how much power the president really has.