Republicans fought tooth and nail to confirm Justice Brett Kavanaugh to the Supreme Court in spite of serious allegations of sexual misconduct in his past (which he denies) and questions of his character and truthfulness under oath.

Former Republican House Speaker Newt Gingrich just explained why: If Democrats take back control of the House and try to investigate President Donald Trump, they might subpoena Trump’s tax returns, and Gingrich predicts the fight would go all the way to the Supreme Court.

“We’ll see whether or not the Kavanaugh fight was worth it,” Gingrich said in an interview with the Washington Post. With Kavanaugh’s confirmation, the Supreme Court is the most ideologically conservative it has been in a generation.

House Republicans have tried to tamp down on investigations into Trump and his administration, hoping to keep the drama to a minimum in Congress. Early in Trump’s presidency, Republicans voted down a motion to release Trump’s tax returns to Congress, and Republican-led House committees have tried to spin the special investigation into Trump’s presidential campaign’s alleged ties with Russian nationals into a witch hunt.

Whether Kavanaugh would be a fair check on the executive branch was among Democrats biggest concerns during the Supreme Court hearings earlier this fall — especially when it comes to investigations into the White House and Trump himself.

Democrats’ concern stemmed from a 2009 article for the Minnesota Law Review in which Kavanaugh writes that Congress should exempt sitting presidents from criminal prosecution.

“I believe that the president should be excused from some of the burdens of ordinary citizenship while serving in office,” Kavanaugh writes. “We should not burden a sitting president with civil suits, criminal investigations, or criminal prosecutions.”

There’s no question that if Democrats take back of control of the House, investigating the president and his administration would be a top priority — calling for his tax returns among them. The Democratic 2018 midterms message has been focused on anti-corruption, and House Democrats have already presented a plan to hold Trump accountable.

Kavanaugh was part of the independent counsel tasked with investigating the death of deputy White House counsel Vince Foster in 1994 — part of a conservative conspiracy that Foster was murdered rather than committed suicide. He went on to work in George W. Bush’s White House counsel office.