The Supreme Court on Friday agreed to review whether a federal law that bans people under domestic violence restraining orders from owning firearms violates the Second Amendment. 

A three-judge panel of the U.S. Court of Appeals for the Fifth Circuit ruled last month that people under domestic violence restraining orders retain their constitutional right to own firearms, finding that the federal law prohibiting them from doing so was unconstitutional under the Supreme Court's landmark New York State Rifle & Pistol Association Inc. v. Bruen decision. 

The Department of Justice appealed the decision in March, and the Supreme Court has now agreed to take up the case in its next term.  

The case, United States v. Zackey Rahimi, concerns a man who was the subject of a civil protective order that banned him from harassing, stalking or threatening his ex-girlfriend and their child. The order also banned him from having any guns.

JUSTICE DEPARTMENT ASKS SUPREME COURT TO OVERTURN DOMESTIC VIOLENCE GUN RULING

The Supreme Court building

A general view of the U.S. Supreme Court building. The high court has agreed to take up U.S. v. Rahimi, a case that asks whether a federal ban on individuals with domestic violence restraining orders from owning firearms violates the U.S. Constitution.  (AP Photo/J. Scott Applewhite, File)

Police in Texas found a rifle and a pistol in the man's home. He was indicted by a federal grand jury and pleaded guilty. He later challenged his indictment, arguing that the law that prevented him from owning a gun was unconstitutional.

He lost his case in federal appeals court, which held that it was more important for society to keep guns out of the hands of people accused of domestic violence than it was to protect a person's individual right to own a gun. 

However, after the Supreme Court issued its Bruen decision, setting news standards for interpreting the Second Amendment, the appeals court vacated the man's conviction. The lower court ruled that the federal law that prohibits people with domestic violence restraining orders from possessing firearms was not "consistent with the Nation's historical tradition of firearm regulation."

GORSUCH BLASTS SOTOMAYOR'S DISSENT IN CHRISTIAN WEB DESIGNER RULING: ‘REIMAGINES’ FACTS FROM ‘TOP TO BOTTOM’

A Glock pistol for sale at Redstone Firearms, in Burbank, California, US, on Friday, Sept. 16, 2022.

A Glock pistol for sale at Redstone Firearms, in Burbank, California, on Friday, Sept. 16, 2022. The Fifth Circuit Court of Appeals ruled in February that individuals under domestic violence restraining orders have a constitutional right to own guns.  (Kyle Grillot/Bloomberg via Getty Images)

Attorney General Merrick Garland vowed to take the case to the Supreme Court. The Department of Justice argues there is a legal tradition in the U.S. and England of disarming people who have posed a danger to the community or threatened to hurt others. 

"In keeping with that history, this Court explained in Heller that the right to keep and bear arms belongs only to ‘law-abiding, responsible citizens,’" DOJ wrote in March, arguing that the federal law in question "fits squarely within the long-standing tradition of disarming dangerous individuals."

DOJ argues the Firth Circuit erred because it "overlooked the strong historical evidence supporting the general principle that the government may disarm dangerous individuals. The court instead analyzed each historical statute in isolation."

SUPREME COURT RULES AGAINST BIDEN STUDENT LOAN DEBT HANDOUT

Attorney General Merrick Garland speaks in Minneapolis

Attorney General Merrick Garland has said that a federal law that prohibits people under a domestic violence restraining order from possessing firearms is constitutional. (AP/Abbie Parr)

Garland previously defended the law as constitutional in a statement condemning the Fifth Circuit opinion. 

"Whether analyzed through the lens of Supreme Court precedent, or of the text, history, and tradition of the Second Amendment, that statute is constitutional," the attorney general said.

Gun rights and gun control groups were both eager for the Supreme Court to weigh in and provide clarity on the scope of its Bruen decision. 

"We are thrilled that SCOTUS will take up this case, as it will present a strong opportunity for the Court to build off of Bruen," said Erich Pratt, senior vice president of Gun Owners of America. "If someone is dangerous enough that society can’t trust them with a gun, they should be behind bars—it’s that simple. But, this law disarms non-violent people who have never been convicted of a crime, so GOA and the Gun Owners Foundation are excited to file an amicus brief in support of overturning the law in question."

Brady: United Against Gun Violence, a nonprofit that advocates for gun control, also applauded the court's decision to hear the case. 

CLICK HERE TO GET THE FOX NEWS APP

"Prohibiting domestic violence abusers from accessing firearms is common-sense, life-saving, and constitutional. Firearms are the most common weapons used in domestic violence homicides, with female intimate partners more likely to be murdered with a gun than by all other means combined," said Brady's Chief Legal Officer Douglas Letter. 

"The Fifth Circuit's decision in Rahimi is egregiously wrong, and is mistaken under the Supreme Court's instructions in the Bruen case. Brady looks forward to the Supreme Court hearing this case and correcting this terribly misguided ruling."

The Supreme Court will hear oral arguments in Fall. 

Fox News' Bradford Betz contributed to this report.