On Tuesday, the Department of Justice filed a disgraceful amicus brief urging a federal appeals court to block the House of Representatives’ subpoena of the president’s financial records. There is no clear purpose for the brief other than a blatantly partisan effort to shield Trump from congressional oversight. It is a startling departure from the DOJ’s traditional independence and another sign that Attorney General William Barr views his job as running interference for the president.

Donald Trump’s lawyers—his personal attorneys, not the DOJ—have been fighting this subpoena since the House Oversight Committee issued it in April. The committee sought eight years of financial records from Mazars USA, which provided accounting services to Trump. Congress has broad constitutional authority to investigate the president, and the Supreme Court has held that the judiciary must honor any subpoena with a “legitimate legislative purpose.” Trump’s lawyers argue that the committee’s subpoena lacks such a purpose, and was merely intended to “harass” the president. In its amicus brief, the Justice Department parrots this argument, framing the House’s subpoena as an effort to torment Trump by inspecting his finances for political gain.

U.S. District Judge Amit Mehta rejected that argument in May. Mehta noted that the committee chairman, Rep. Elijah Cummings of Maryland, had provided a memorandum detailing a number of legitimate reasons for the subpoena. Cummings wrote that the committee sought to learn whether Trump “accurately reported his finances to the Office of Government Ethics” so it could determine “whether reforms are necessary to address deficiencies with current laws.” The committee also wished to discover whether Trump “has undisclosed conflicts of interest that may impair his ability to make impartial policy decisions.”

The House has already passed an ethics bill, H.R. 1, this year with provisions aimed directly at the executive. Lawmakers plainly have a “legitimate legislative purpose,” Mehta wrote, in probing the president’s ethics to decide whether these reforms are necessary and sufficient. Moreover, the committee wished to know “whether the President may have engaged in illegal conduct before and during his tenure in office.” It “is simply not fathomable,” Mehta wrote, “that a Constitution that grants Congress the power to remove a President for reasons including criminal behavior would deny Congress the power to investigate him for unlawful conduct—past or present—even without formally opening an impeachment inquiry.”

Finally, the committee sought to learn whether Trump had complied with the Constitution’s foreign emoluments clause, which bars the president from accepting any gift from a foreign government without Congress’ consent. “Surely,” Mehta wrote, “incident to Congress’s authority to consent to the President’s receipt of Emoluments is the power to investigate the President’s compliance with the Clause.”

Trump’s lawyers promptly appealed Mehta’s decision to the U.S. Court of Appeals for the District of Columbia Circuit. A panel of judges for the D.C. Circuit is currently mulling whether Mehta got it right.

The Justice Department had no reason to step in; Trump is amply represented by his own attorneys, and this matter does not require the defense of some federal law. To the contrary, the DOJ typically sits out such interbranch disputes, and it has no obvious interest in siding with the president against Congress here.

But the DOJ filed an amicus brief anyway—weeks after oral arguments at the D.C. Circuit—and it is flabbergasting. The Supreme Court has repeatedly held that courts may not search for some covert illicit motive among committee members; if the committee states a “legitimate legislative purpose,” the judiciary must respect it. The DOJ ignores this rule. It argues that the House’s actions raise “the specter that members of the Legislative Branch are impermissibly attempting to interfere with or harass the Head of the Executive Branch.” And it calls for a “searching evaluation” of committee members’ motives.

The DOJ argues that Cummings’ memorandum justifying the subpoena is “insufficient” because it was “not ratified by the full House.” It cites no authority for this proposition because it is made-up; the Supreme Court has never held that a committee’s subpoena is invalid until ratified by the full chamber. But even if that were the law, the DOJ has a problem: The full House already ratified the Mazars subpoena. In response to this fact, the DOJ claims that the House’s vote doesn’t count because “it did so only as part of a general authorization for pending and future investigations.” There is no precedent to support the argument that the House must ratify a subpoena with some unknown level of specificity; it is a blatant exercise in moving the goalposts. The DOJ is attempting to throw new roadblocks in front of the committee on the basis of its own pseudo-constitutional beliefs.

But that’s not even the strangest part of the brief. The DOJ insists that the House cannot investigate Trump pursuant to its impeachment authority. Why? Because it hasn’t asserted “jurisdiction over” impeachment. In other words, the House’s constitutional power of impeachment lies dormant until someone declares an intent to impeach. Who, exactly, holds this mystical authority? A committee chair? The speaker? A majority of lawmakers, shouting in unison? Who knows? The DOJ does not say when the impeachment power officially kicks in, because it has concocted this rule out of thin air. Maybe Mehta was on to something when he wrote that it “is simply not fathomable” that the Constitution could (silently) limit the impeachment power so arbitrarily.

Ironically, the DOJ ’s amicus brief winds up making the opposite argument it intends to.

The DOJ brief fares no better in its dismissal of Congress’ authority over emoluments. Again, the Constitution explicitly bars the president from accepting gifts from foreign states without Congress’ consent. But the DOJ argues that this power does not justify the subpoena because there’s no proof the House “is investigating the President with a view toward consenting to any undisclosed emoluments.”

That is a lie. Cummings’ memorandum expressly stated that the House sought “to assess whether [Trump] is complying with the Emoluments Clauses of the Constitution.” If that weren’t enough—and it is—Cummings is also investigating Trump International Hotel to determine whether it grants Trump unconstitutional emoluments. Recognizing, perhaps, that the courts cannot rigorously scrutinize a committee’s stated intentions, the DOJ has chosen to pretend the committee never stated those intentions in the first place.

Most gallingly, the DOJ urges the court to reject the legitimacy of the House’s legislative purpose by preemptively declaring its legislation unconstitutional. The DOJ writes that H.R. 1 and similar proposals do not deserve any “presumption of legitimacy” because they are probably illegal. It claims that the Constitution bars Congress from forcing the president to divest from his conflicts of interest. Thus, the House cannot investigate Trump to help it craft ethics reforms, since those reforms are unconstitutional.

This argument is astonishing. Federal courts are forbidden from issuing advisory opinions on the constitutionality of pending legislation. A bill cannot be challenged in federal court if it is just a bill; this is Schoolhouse Rock stuff. Yet the DOJ is essentially asking the judiciary to declare a provision of H.R. 1 unconstitutional before it becomes law. This vast expansion of judicial power would constitute an advisory opinion on steroids. The courts would be obligated to gauge the legality of bills under consideration in Congress every time they are asked to quash a congressional subpoena. That is not and cannot be the law.

Ironically, the DOJ’s amicus brief winds up making the opposite argument it intends to. The Supreme Court curtails the judiciary’s ability to quash congressional subpoenas for a reason. Once courts start inspecting lawmakers’ motives, they become entangled in the legislative process. It is not the job of judges to decide whether the House really needed to issue a subpoena; once a committee stated a “legitimate legislative purpose,” the courts must butt out. Otherwise, judges will wind up curbing Congress’ constitutional powers and effectively killing legislation before it passes. The judiciary is ill-equipped to determine just how much information lawmakers require to govern effectively.

Still, counterproductive as the DOJ’s brief may be, it reveals the full extent of the department’s distortion under Barr. The Justice Department represents the United States, not the president himself, and it has no business putting its thumb on the scale of Trump in his fight against Congress. Barr may see the office of the attorney general as an outpost of the White House. He may see himself as a loyal foot soldier for Trump in his squabble with Democrats. But the Justice Department was never intended to be a weapon for presidents to wield against their political opponents. Tuesday’s brief degrades the institution, eroding its legitimacy for purely partisan goals.