Justice Brett Kavanaugh (L) and Chief Justice John Roberts listen as President Donald Trump speaks during his second inaugural. | Photo by Chip Somodevilla/Getty ImagesOn Friday, the Supreme Court handed down an order that could completely upend the balance of power between Congress and President Donald Trump. The order effectively permits Trump to cancel $4 billion in foreign aid spending that he is required to spend under an act of Congress. Trump claims the power to “impound” funds, meaning that he will not spend money that has been appropriated by Congress. Until Trump’s second election, legal experts across the political spectrum agreed that impoundment is unconstitutional. Indeed, many doubted whether someone can even make an argument supporting impoundment. As future Chief Justice William Rehnquist wrote in a 1969 Justice Department memo, “it is in our view extremely difficult to formulate a constitutional theory to justify a refusal by the President to comply with a congressional directive to spend.”The justices, however, appear to have voted entirely on partisan lines in Friday’s decision, in a case called Department of State v. AIDS Vaccine Advocacy Coalition. All three of the Democratic justices dissented, while none of the six Republicans publicly disagreed with the Court’s decision. (The Court did not reveal how each of the Republicans voted, so it is theoretically possible that one of them quietly dissented.)The Court’s decision, moreover, is wrong. The justices in the majority explained why they voted to let Trump cancel this spending in a single sentence. While they did not actually rule that Trump acted lawfully, they determined that “the Government, at this early stage, has made a sufficient showing that the Impoundment Control Act precludes” this suit, seeking to restore the funds in question, from moving forward.But, as Justice Elena Kagan writes in dissent, the Impoundment Control Act states that “‘nothing contained in this Act . . . shall be construed’ as ‘affecting in any way the claims or defenses of any party to litigation concerning any impoundment.’” In other words, the Impoundment Control Act states that it must not be read to cut off lawsuits challenging a president’s decision to cut off federal spending. So the justices in the majority read that law in a way that is explicitly forbidden by the law’s text.In fairness, the Republican justices’ decision does include a line suggesting that they may revisit the question of whether Trump can unilaterally repeal a federal spending law in the future. But even if these justices eventually admit their error and reverse course, their initial decision is likely to cause an extraordinary amount of harm to the nation while it is in effect.That’s because the AIDS Vaccine decision came right as the federal government was about to shut down. To reopen it, Congress will need to find the votes to enact a new spending law. And the Supreme Court just made that task exceedingly difficult, because Trump can’t be trusted to honor the terms of any deal that reopens the government if he can cancel federal spending that is part of that deal.Why the AIDS Vaccine decision is bad news for anyone who wants the government to reopenThe timing of this decision could not have been worse — at least if you believe in continuity of government. At midnight on Wednesday, funding for much of the federal government will expire, which means that the US government is entering a shutdown. Trump has threatened to slash federal benefits and fire many government workers during this shutdown.Although Republicans control both houses of Congress and the White House, the Senate’s rules ordinarily require 60 votes to pass legislation — and Republicans only hold 53 seats in the Senate. Democrats proposed giving Republicans the additional votes to keep the government open in return for canceling looming cuts to Obamacare and Medicaid.This sort of negotiation is very normal. Democrats and Republicans typically have different spending priorities, and they ordinarily reach some sort of compromise eventually, that will allow them to fund the government.Historically, however, these compromise agreements were possible because both parties could rely on the other to honor the agreement after it became law. But the Supreme Court’s decision in AIDS Vaccine suggests that, even if congressional Democrats and Republicans reach a deal where Democrats get some of the health care spending that they seek, Trump can simply cancel that spending after the bill ending the shutdown is signed into law. If he could cancel the foreign aid spending Congress authorized as the Court just indicated he can, why couldn’t he cancel anything else the legislators agree to?That implication of the justices’ decision means we may be in for a very long shutdown. Negotiating something as important and as complicated as the US federal budget is a difficult task under any circumstances. But it may be impossible when one of the parties cannot trust the other one to keep its side of any bargain.Alternatively, Republicans may change the Senate rules to allow the bill to pass by a simple majority vote. That would likely mean that the minority party would be cut out of all future budget negotiations, unless it controls at least one house of Congress. But both parties have historically included senators who are reluctant to allow legislation to pass by a simple majority. So it is unclear that Republicans have the votes to end the shutdown that way.The United States, in other words, may now be entering a prolonged period of extraordinary dysfunction. And the Republican justices bear as much blame for that dysfunction as anyone.