Zackey Rahimi, a drug dealer in Texas with a history of armed violence, is “hardly a model citizen,” a federal appeals court judge wrote in March, with considerable understatement. But the court vacated Mr. Rahimi’s conviction under a federal law that makes it a crime for people subject to domestic-violence orders to possess guns, ruling that the law violated the Second Amendment.

Next week, the Supreme Court is set to consider whether to hear an appeal of that decision, which applied a history-based test to rule that the government was powerless to disarm Mr. Rahimi under the domestic-violence law. The chances that the justices will agree to hear the case are good.

The case started in 2019, when Mr. Rahimi assaulted his girlfriend and threatened to shoot her if she told anyone, leading her to obtain a restraining order. The order suspended Mr. Rahimi’s handgun license and prohibited him from possessing firearms.

Mr. Rahimi defied the order in flagrant fashion, according to court records.

He threatened a different woman with a gun, leading to charges of assault with a deadly weapon. Then, in the space of two months, he opened fire in public five times.

Upset about a social media post from someone to whom he had sold drugs, for instance, he shot an AR-15 rifle into his former client’s home. When a fast-food restaurant declined a friend’s credit card, he fired several bullets into the air.

The shootings led to a search warrant of Mr. Rahimi’s home, which uncovered weapons, and he was charged with violating the federal law.

After a judge rejected his Second Amendment challenge to the law, he pleaded guilty and was sentenced to more than six years in prison. The U.S. Court of Appeals for the Fifth Circuit at first affirmed his conviction in a short decision, rejecting the argument that the law violated the Second Amendment in a footnote.

But the appeals reversed course after the Supreme Court issued a decision last June establishing a new test to decide whether gun control laws are constitutional, one focused on history.

Under that test, a unanimous three-judge panel of the Fifth Circuit ruled, the law prohibiting people subject to domestic-violence orders from possessing firearms violated the Second Amendment because there was no historical support for it.

Next week, almost a year to the day after the Supreme Court announced the new approach in New York State Rifle & Pistol Association v. Bruen, the justices are set to meet to discuss whether to hear the Biden administration’s appeal. The court often hears appeals of decisions holding federal laws unconstitutional.

The case, United States v. Rahimi, No. 22-915, would give the court a chance to explore the scope of its new test, which requires the government to identify historical analogues to justify laws limiting Second Amendment rights.

Zackey Rahimi was sentenced to more than six years in prison, but a court vacated his conviction.Credit…Tarrant County Sheriff’s Office

As a general matter, Justice Clarence Thomas wrote in his majority opinion in Bruen, the Second Amendment protects the rights of “an ordinary, law-abiding citizen.” And there is, the Biden administration told the justices in the new case, “strong historical evidence supporting the general principle that the government may disarm dangerous individuals.”

But the Fifth Circuit rejected a variety of old laws identified by the government as possible analogues, saying they did not sufficiently resemble the one concerning domestic-violence orders. Many of them, Judge Cory T. Wilson wrote for the panel, “disarmed classes of people considered to be dangerous, specifically including those unwilling to take an oath of allegiance, slaves and Native Americans.” That was different, he wrote, from domestic-violence orders, which make case-by-case judgments about a particular individual’s dangerousness.

Lawyers for the administration questioned that distinction. “It would be bizarre,” they wrote, “if legislatures could disarm dangerous individuals based on categorical presumptions, but not based on individualized judicial findings after notice and a hearing.”

Judge Wilson, who was appointed by President Donald J. Trump, wrote that the government’s insistence that it can disarm people who are not law-abiding “admits to no true limiting principle.”

“Could speeders be stripped of their right to keep and bear arms?” he asked. “Political nonconformists? People who do not recycle or drive an electric vehicle?”

Judge Wilson conceded that the challenged law “embodies salutary policy goals meant to protect vulnerable people in our society.” But he said the approach required by the Bruen decision did not allow courts to weigh the benefits of the law against its burdens. What was important, he wrote, quoting that decision, was that “our ancestors would never have accepted” the law on domestic-violence orders.

Judge James C. Ho, who was also appointed by Mr. Trump, issued a concurring opinion saying there were better ways to protect victims of domestic abuse.

“Those who commit violence, including domestic violence,” he wrote, “shouldn’t just be disarmed — they should be detained, prosecuted, convicted and incarcerated. And that’s exactly why we have a criminal justice system — to punish criminals and disable them from engaging in further crimes.”

But Judge Ho said domestic-violence orders were products of the civil justice system and were subject to abuse.

“Scholars and judges have expressed alarm that civil protective orders are too often misused as a tactical device in divorce proceedings — and issued without any actual threat of danger,” he wrote. “That makes it difficult to justify” the law Mr. Rahimi challenged “as a measure to disarm dangerous individuals.”

In a brief urging the Supreme Court to deny review, lawyers for Mr. Rahimi said domestic violence was not a new phenomenon. “The founders could have adopted a complete ban on firearms to combat intimate-partner violence,” their brief said. “They didn’t.”