WASHINGTON (AP) — The Supreme Court is rejecting a challenge to federal regulation of gun silencers, just days after a gunman used one in a shooting rampage that killed 12 people in Virginia.

The justices did not comment Monday in turning away appeals from two Kansas men who were convicted of violating federal law regulating silencers. The men argued that the constitutional right “to keep and bear arms” includes silencers.

Kansas and seven other states joined in a court filing urging the justices hear the appeal. The states said the court should affirm that the Second Amendment protects “silencers and other firearms accessories.”

The other states joining Kansas in the court filing are: Arkansas, Idaho, Louisiana, Montana, South Carolina, Texas and Utah.

President Donald Trump’s administration asked the court to stay out of the case and leave the convictions in place.

WATCH: What makes the Virginia Beach shooting different from other massacres

Shane Cox, owner of a military surplus store, was convicted of making and transferring an unregistered silencer, and customer Jeremy Kettler was convicted of possessing one, all in violation of the 85-year-old National Firearms Act. Both men were sentenced to probation.

Meanwhile, police are trying to determine a motive for the deadly shootings in Virginia Beach, Virginia. Authorities have said that city employee DeWayne Craddock opened fire in a municipal building on May 31. Police say Craddock was armed with two semi-automatic handguns, a silencer and extended ammunition magazines.

Craddock later was killed in a shootout with police.