The U.S. Court of Appeals for the Third Circuit issued two rulings Tuesday on the federal law barring people with certain felony convictions from possessing firearms, reaching different outcomes based on the offenses involved.

In the case of James Bost, the court upheld the restriction. Bost had pleaded guilty in Pennsylvania to terroristic threats, conspiracy, false imprisonment and simple assault following a 2002 carjacking. He later faced federal firearms charges after authorities found him with a gun. The court said convictions indicating a risk of physical violence involving firearms can support disarming a person.

In a separate case, the court held that the federal ban could not constitutionally be applied to Edward Williams based on his prior convictions for driving under the influence. One conviction carried a sentence of 90 days to two years, served under home confinement. Williams challenged the restriction after learning the conviction barred him from owning guns.

Writing for the court in Williams’ case, U.S. Circuit Judge Paul Matey rejected the Justice Department’s argument that historical restrictions on habitual drunkenness justified applying the federal firearms ban. Judge Arianna Freeman disagreed with aspects of the majority’s reasoning, arguing that conduct demonstrating a credible threat to public safety may justify a firearms restriction even without an explicit violent offense.

The rulings come amid litigation over how the Supreme Court’s 2022 decision in New York State Rifle & Pistol Association v. Bruen affects modern gun laws. Bruen held that firearm restrictions must be consistent with the nation’s historical tradition of regulation.