The U.S. Coast Guard lieutenant accused of plotting a domestic terrorist attack will be prosecuted on all four federal counts against him after a failed bid by his attorneys to have some of the charges tossed.

The public defenders for Lt. Christopher Hasson had asked a federal judge to drop two charges of unlawful possession of firearm silencers, saying the counts violate his Second Amendment rights. They also had asked the judge to drop a drug count, arguing that the offense prosecutors have charged him with is vague.

U.S. District Judge George J. Hazel denied the request to dismiss the charges Friday, almost two weeks after hearing arguments on the defense request.

Hasson, 50, of the Silver Spring area, was arrested in February after federal authorities suspected him of stockpiling weapons and studying terrorist manifestos, including on his work computer, to launch an attack on U.S. politicians and journalists.

Federal prosecutors accuse him of developing a list of enemies to target and studying their locations as part of a “mass casualty event” driven by his white-supremacist views.

Hasson, who faces no terrorism-related offenses, has pleaded not guilty to two counts related to unlawful possession of silencers, a count of possession of firearms by an unlawful drug user and possession of a controlled substance. He is scheduled for a six-day trial starting Oct. 21.

The federal public defenders representing Hasson had argued that the silencer charges should be dropped because silencers are considered arms for Second Amendment purposes.

Though silencers do not fire ammunition on their own, owning them protects gun users’ hearing and health, making them indispensable to exercising the right to use a gun, the defense team argued.

As an example, they cited another court’s finding that although firing ranges are not exactly arms, they are protected under the Second Amendment because they allow people to safely and effectively use firearms.

“Silencers receive the explicit protection of the Second Amendment because they constitute ‘arms’ (or accessories to arms),” assistant federal public defenders Liz Oyer and Cullen Macbeth wrote in court filings. “And even if they did not, silencers would still fall within the scope of the Second Amendment’s implicit guarantee because their use is indispensable to exercise of the core Second Amendment right, i.e., the use of a gun for self-defense in the home.”

The government argued that silencers do not explicitly receive Second Amendment protection because they are not “bearable arms” or “integral to the operation of any gun.”

“In parenting parlance, silencers might be a ‘nice to have,’ but they are not a ‘need to have,’ ” Assistant U.S. Attorney Thomas Windom wrote in filings. “A gun — every gun — works perfectly well without a silencer. For that simple reason, silencers are not firearms within the meaning of the Second Amendment.”

In his written opinion, Hazel said a silencer is not an “arm” or a “weapon” because it would not be useful on its own in a confrontation and therefore is not protected by the Second Amendment.

“A silencer is not itself used ‘to cast at or strike another,’ it does not contain, feed, or project ammunition, and it does not serve any intrinsic self-defense purpose,” Hazel wrote in agreement with other courts that have opined on the matter.