WASHINGTON (AP) — Guy Boyd was hanging out with friends he had known for years in Ann Arbor, Michigan, on the night an accidental gunshot tore into his head.

The high schoolers were too young to buy guns legally, but federal and state laws didn’t apply to the gun parts kit his best friend bought online and assembled himself to fashion a so-called ghost gun.

Somehow, the gun went off and a shot struck Boyd in the eye. He felt a searing pain in his head and his vision went red. “I remember hearing, ‘I love you, bro.’ And I said it back, but I didn’t know who said it,” Boyd said.

He spent nearly a week in the hospital after that night in May 2021. Bullet and bone fragments remain embedded in his brain, causing seizures that make his dream of going to culinary school in New York seem hopelessly out of reach.

“I was in good health before, playing football, didn’t have any medical problems,” said Boyd, now 20. “And now it’s one thing after another.”

A Biden administration rule passed the following year now blocks teenagers and people who can’t pass a background check from buying the kits. But manufacturers and gun-rights groups pushed back in court, and on Tuesday the Supreme Court will hear arguments on whether the regulation will stand.

“The court’s conservative majority may come in somewhat skeptical of ATF’s reach here, both as a federal agency and as a matter of gun rights,” said Timothy Lytton, a professor at Georgia State University College of Law, referring to the Bureau of Alcohol, Tobacco, Firearms and Explosives.

The number of ghost guns around the country has soared in recent years, going from fewer than 4,000 in 2018 to nearly 20,000 recovered at crime scenes in 2021, according to Justice Department data. Since the regulation went into effect, several cities report the number of privately made firearms recovered at crime scenes has flattened or declined.

Ghost guns are privately made firearms without serial numbers. The 2022 regulation was focused on those sold online in kits with everything needed to build a functioning firearm — sometimes in less than 30 minutes, according to court documents.

The kits, long popular with hobbyists, were considered gun parts rather than firearms under federal law, so buying one didn’t require the kind of background checks and age verification that licensed gun stores run.

That also made the products popular, authorities say, with people who couldn’t legally buy a gun, including those who were under 21 or couldn’t pass a background check. Without a serial number, ghost guns found at crime scenes are also nearly impossible to trace.

The kits can still be sold, but after new regulations and a series of local lawsuits against manufacturers, police have seen the number of recovered ghost guns decline in cities like New York, Los Angeles and Philadelphia, according to court documents.

“We’ve seen them drop pretty significantly off the radar, I think, because of that regulation,” said Adam Garber, executive director of the gun violence prevention group CeaseFirePA, based in Philadelphia, where a mass shooting carried out with an AR-15-style ghost gun left five people dead.

In Baltimore, a city long plagued by gun violence, ghost gun recoveries have dropped last year for the first time since 2019, according to court documents.

“The biggest problem is, people who aren’t able to purchase a gun, whether prohibited adults or under 21, were able to purchase these guns through the mail and the internet,” said police Commissioner Richard Worley. ”Bottom line, we want less violence. We just have to limit that as best we can by the process of getting illegal guns off the street.”

But industry and gun rights groups say the ATF overreached by targeting a product that had long been legal. More than two dozen Republican-leaning states backed those arguments in documents filed before the Supreme Court.

“No matter how wise ATF’s final rule or how ‘weighty’ petitioners’ policy concerns may be, the final rule exceeds ATF’s statutory authority. And that should be the end of the matter,” the states said in the brief authored by the West Virginia Attorney General’s Office.

There are many ways people can get guns, and the best way to address violence is enforcing the laws already on the books, said Lawrence Keane, the senior vice president and general counsel at the National Shooting Sports Foundation, an industry group. “Nobody wants to see any product used to harm another person, whether it’s a firearm, a bat or a car. But those are criminal justice issues. Congress would need to take action,” he said.

The Supreme Court, by a 5-4 vote, previously intervened to keep the regulation in effect during the legal fight. Chief Justice John Roberts and Justice Amy Coney Barrett joined with the court’s three liberals to form a majority, but four conservative justices would have kept the regulation on hold while the case played out.

The justices expanded gun rights in 2022 with a landmark opinion that found the nation’s historical traditions, rather than modern public safety concerns, determine which gun laws can stay on the books.

The ghost gun case, though, isn’t directly about the Second Amendment. Instead, it deals with the powers of federal agencies. That’s an area where conservative justices have often been deeply skeptical, overturning a 40-year-old decision that made it easier for federal agencies of all stripes to regulate everything from the environment to consumer protections.

The Supreme Court also struck down a Trump administration ban on bump stocks, a gun accessory that allows semiautomatic weapons to fire at a rate comparable to machine guns and was used in the nation’s deadliest modern mass shooting in Las Vegas.

The court found that while the bump stocks do enable rapid fire, the agency was wrong to classify them as illegal machine guns because they require more input from the shooter to function.

The challengers to the ghost gun rule argue the Biden administration similarly overstepped its bounds with its new regulation.

“The expected result of ATF’s rule was not simply to regulate this industry but to destroy it,” wrote attorneys representing Jennifer VanDerStok, a Texas high school teacher who owns firearm parts she wants to make into guns, as well as kit manufacturers and gun-rights groups.

They compare the kits to pinewood derby car kits popular with Boy Scouts that come with wheels, nails and a block of wood to be carved and sanded into a toy car.

The government, on the other hand, says in court documents the kits are more like Ikea bookshelves: The store couldn’t avoid a tax on home goods simply by claiming it sells “furniture parts kits.”