“Tell us a little bit about September 11, 2001,” Senator John Cornyn, a Republican of Texas, asked Brett Kavanaugh, President Trump’s nominee for the Supreme Court, on Wednesday. “Where were you?” Kavanaugh, who was a Bush Administration lawyer at the time, said that he remembered being in the West Wing when hijackers flew a plane into the second one of the Twin Towers, and then being told to “get out, run out,” as the White House was evacuated. Afterward, he stood with his colleagues in Lafayette Park, “bewildered.”

“Correct me if I’m wrong,” Cornyn continued, “but, notwithstanding this experience that you, and everybody you cared about, having been through—this terrible travesty of 9/11, you ruled in favor of Osama bin Laden’s bodyguard and driver. Correct?”

“That is correct,” Kavanaugh answered. He had written the majority opinion in Salim Ahmed Hamdan v. United States, a 2012 case before the D.C. Circuit Court of Appeals, which overturned Hamdan’s conviction by a military commission on a charge of providing material support to terrorists.

“How could you do that?” Cornyn asked, his face a mask of astonishment. “How could you possibly do that?”

“The rule of law applies to all who come before the court of the United States,” Kavanaugh said.

“Even an enemy combatant?” Cornyn asked.

“Equal justice under law. Everyone is entitled to—” Kavanaugh began to reply.

“Even a non-citizen?” Cornyn interrupted, his eyebrows arched.

“Yes,” Kavanaugh said, and then he seemed to search for a clarification. “Um, uh, non-citizens who are tried in U.S. courts of course have the constitutional rights—and, really, my model on that, judicial mode, for thinking about something like that, because I’ve thought about what you’re asking about, Justice Jackson, of course, Robert Jackson.”

Of course—Robert Jackson, having been appointed to the court by Franklin D. Roosevelt, and having served as his Attorney General, wrote a blistering dissent in Korematsu v. United States, the case in which the Supreme Court shamefully upheld the Roosevelt Administration’s internment of Japanese-Americans. It is a topical reference, because, as Kavanaugh noted, that majority opinion has been “now overruled”—just a few months ago, in the decision that also upheld the Trump Administration’s trimmed-down travel ban, in a decision written by Chief Justice John Roberts. (Given the focus in the hearings on whether Kavanaugh believes that certain precedents are settled law, it would have been interesting to hear what he had to say if Korematsu hadn’t been overruled yet.)

But, while it is good to know that Kavanaugh would not sanction the mass detention of American citizens on the basis of their ethnic background, there are limits to what his Hamdan ruling shows—not least because, as Stephen Vladeck, a law professor at the University of Texas, and others have pointed out, in most of the Guantánamo-related cases that came before him, Kavanaugh ruled in the other direction. That includes the 2016 Al-Bahlul case, which seemed to undercut Hamdan in some respects, and, markedly, Al Bihani v. Obama, which gave support to the indefinite detention of people designated as “enemy combatants” as a Presidential prerogative in wartime. Indefinite detention, which is the status for many of the prisoners now at Guantánamo, can mean being held without ever being charged, which puts a limit on what it even means to “come before a court of the United States.” (Similarly, Kavanaugh’s record in certain cases regarding undocumented immigrants, such as those involving a teen-age girl in detention who sought an abortion, and workers at a meatpacking plant, raise questions about how equal non-citizens might really be before him.)

Photograph by Mark Peterson / Redux for The New Yorker

The Hamdan case, in which Kavanaugh ruled for the driver, is more precisely known as Hamdan II, to differentiate it from a landmark 2006 Supreme Court case, Hamdan v. Rumsfeld. In Hamdan I, also brought by the driver, the Court found that, constitutionally, the entire military-commissions system set up by the Bush Administration after 9/11 was fatally flawed. Hamdan was retried under a new military-commission law, and Kavanaugh was reacting, above all, to the new statute’s ambiguity and sloppiness. Basically, military commissions, being military, are only supposed to try certain crimes. According to the statute, this would include anything defined as an international war crime before the date that it was enacted, in 2011. The date is important, because the Constitution says that you can’t be put on trial for something that wasn’t a crime when you did it—Congress can’t retrospectively criminalize things or people. (This is called the ex-post-facto clause.) Congress referred to “material support of terrorism” as one of those existing war crimes, and Hamdan was then charged with it. The problem is that Congress was wrong: material support of terrorism was not, in fact, recognized as an international war crime. And so Kavanaugh and his colleagues were looking at the conviction of someone for a crime that, in light of the military commission’s mandate, was not really a crime. It is a complicated case to explain, but it wasn’t a tough one for anyone guided by the Constitution—or it shouldn’t have been.

The Republican senators didn’t see it that way. “Well, it’s hard for me to imagine a more unpopular defendant than Osama bin Laden’s driver,” Cornyn said, saying that the Hamdan ruling alone could “conclusively” put to rest any idea that Kavanaugh was “prejudiced against the small guy, in favor of the big guy.” Similarly, Senator Thom Tillis, a Republican of North Carolina, also expressed wonder at Hamdan II, telling Kavanaugh that there were “a few cases where I didn’t like the way you ruled. That was one of them, but you did it for the right reasons.” But shouldn’t it be a presumption—not a remarkable achievement—that our courts don’t trample on the rights of unpopular, even reprehensible, defendants? That is particularly true in times when fear is in the air, and the President is tweeting about treason—and seems notably confused about what is war and what is peace, and what is dissent and what is a crime against him.

In that sense, it is notable that Kavanaugh’s opinions, in Hamdan II and Bahlul, have been seen as supporting the idea that Congress has relatively broad latitude in defining future war (or war-like) crimes that might be triable by military commissions. The United States, Kavanaugh has held, does not need to be limited by what the international community thinks in this regard.

“Today we have a President who said he can authorize worse than waterboarding,” Senator Dianne Feinstein, a Democrat of California, said in her questioning of Kavanaugh, on Thursday. She wanted to know what he might think of that. “I know what the law is,” Kavanaugh said, but he otherwise dodged the question. Feinstein also asked about a George W. Bush signing statement, attached to a bill with an anti-torture amendment championed by John McCain, in which Bush said that he would interpret that amendment “in a manner consistent with the constitutional authority of the President to supervise the unitary executive branch and as Commander-in-Chief and consistent with the constitutional limitations on judicial power”—that is, seeming to reserve the right to torture, anyway. Since Kavanaugh was Bush’s staff secretary, that statement would have at least come across his desk, and one unanswered question is whether he’d had more to say about it. (Senator Dick Durbin, a Democrat of Illinois, has also pressed this point.) Replying to Feinstein, Kavanaugh said, vaguely, that “there was debate” about the statement. As she continued that line of questioning, Kavanaugh spoke about how, in such circumstances, White House lawyers needed to show “backbone,” and about how an important part of the job is a willingness “to go into the Oval Office and say no.” And if they don’t, in years to come, would Justice Kavanaugh, of the Supreme Court?