Justice Brett M. Kavanaugh could shift the Supreme Court’s center of gravity on national security matters, experts say. (Fred Schilling/U.S. Supreme Court)

Justice Brett M. Kavanaugh’s arrival on the Supreme Court could alter its handling of issues related to wartime detainees, as the Trump administration seeks to assert broad powers to imprison terrorism suspects indefinitely, legal experts said.

The newly minted justice replaces Anthony M. Kennedy, who helped affirm detainee rights in landmark cases during the George W. Bush administration. Kavanaugh could shift the high court’s center of gravity on national security matters, experts said, making Chief Justice John G. Roberts Jr. the new median vote on those issues.

While Kavanaugh’s views on national security were overshadowed in the lead-up to his confirmation Saturday by sexual assault allegations and questions about his suitability for a lifetime appointment, he brings to the court a deep record in this area.

In a dozen years as a circuit court judge, Kavanaugh left an important mark on federal courts’ interpretations of landmark Supreme Court rulings on detainee rights and the military prison at Guantanamo Bay, Cuba.

Again and again, scholars said, Kavanaugh gave broad deference to presidential powers on matters of national security and war, espousing a limited view of the courts’ ability to challenge the executive branch’s mandate in that realm.

Rebecca Ingber, a professor at the Boston University School of Law who previously served as a State Department lawyer, said Kavanaugh had articulated an “exceedingly narrow” role for courts in checking presidential decision-making.

Under his view, “there would be very little role for courts in questioning what constitutes a matter of ‘national security,’ ” she said. “Thus, were the court to adopt Kavanaugh’s approach, the president would wield virtually unreviewable powers, simply by invoking the magic words ‘national security’ or ‘war.’ ”

Kavanaugh joins the court as the Trump administration continues a 17-year-old counterterrorism campaign that has given rise to a host of thorny legal and ethical issues surrounding military detainees.

The Trump administration has not sent any new prisoners to Guantanamo, but the president issued an executive order this year keeping the facility in operation and has vowed to halt what he characterized as his predecessor’s “foolish” campaign to release detainees overseas.

Guantanamo has receded from public view as the population has dwindled from a high of more than 700 detainees under Bush to about 40 at the time of Trump’s inauguration. About a dozen of the remaining detainees are at some stage of a slow-moving military commission process. Others are expected to be held in perpetuity without trial.

While there are no detainee-related issues now before the Supreme Court, justices are likely to return to those issues in the future. Some of the remaining detainees are about 40 years old, meaning they could have decades of detention ahead of them. Already, their long imprisonment has faced new challenges in a lower court under Trump.

“The Supreme Court is not done with Guantanamo,” said Stephen Vladeck, a professor at the University of Texas School of Law. “At some point, it’s going to have to reckon with the military commissions again,” as well as potential challenges from other detainees who are not part of any military trial, he said.

Trump’s administration, meanwhile, is the third since the 9/11 attacks to cite a 2001 law, the Authorization for Use of Military Force, as a legal basis for its global counterterrorism operations.

Kavanaugh’s views could be pivotal if courts take up the government’s controversial use of that law, known as an AUMF, as a legal basis for its campaign against the Islamic State. Critics say the law does not provide justification for operations against the Islamic State.

The American Civil Liberties Union has challenged the government’s ability to detain a U.S. citizen suspected of links to the Islamic State under the 2001 AUMF, which cites threats from al-Qaeda.

Central to Kavanaugh’s views on national security is his skepticism of the relevance of international law in establishing limits to presidential powers.

In a lengthy opinion he wrote in al-Bihani v. United States, Kavanaugh argued that international law should not constrain the president’s power to fight al-Qaeda and other militant groups, and to hold detainees as part of that campaign.

“In sum, a federal court lacks legitimate authority to interfere with the American war effort by ordering the President to comply with international-law principles that are not incorporated into statutes, regulations, or self-executing treaties,” Kavanaugh wrote.

Ingber, who testified about Kavanaugh’s national security record ahead of his confirmation vote, said that assertion could further empower the president.

“Because Congress has always legislated war powers against a backdrop of international law, if you read out the international law constraints on the president’s authority to use force, then in many instances there are no remaining constraints,” she said.

Scott Anderson, a legal scholar at the Brookings Institution, said Kavanaugh’s views on detainee matters could have implications for a range of national security cases, including issues related to privacy or surveillance.

“The most direct relevance of Kavanaugh’s thinking and his approach to Guantanamo and detention issues really is the broader way he thinks about how courts should view challenges to executive actions related to foreign affairs and national security,” Anderson said.

Vladeck said Kavanaugh’s belief in a broad executive mandate appeared to have been informed by his experience as a White House official before and after the Sept. 11, 2001, attacks, a moment when the Bush administration mobilized a far-reaching response to terrorism threats.

“He’s inclined to give the government the benefit on the doubt,” Vladeck said.

Ann Marimow contributed to this report.