The Coast Guard lieutenant who allegedly stockpiled weapons and wanted to start a “race war” pleaded guilty on Thursday to gun and drug charges, and now faces up to 31 years in prison.

Christopher Hasson, a self-avowed white nationalist who spent 31 years in the military, was arrested in February for ordering synthetic opioids from Mexico, being an addict in possession of a firearm, and owning two unregistered gun silencers.

Prosecutors filed supplementary documentation alleging that Hasson, 50, had compiled a hit list of Democratic lawmakers and journalists and was plotting a domestic terror attack. They successfully convinced a judge that Hasson posed a “substantial risk of danger to the community” and should be detained pending the outcome of a trial. Hasson appealed, but ultimately lost.

The case was a glaring reminder of the limitations of federal law when it comes to potential domestic terrorists like Hasson. Because there’s no federal domestic terror statute, prosecutors were stuck pursuing the gun and drug charges against Hasson.

It also called into question whether the military was doing enough to keep violent extremists out of its ranks.

Hasson’s sentencing is slated for January.