The Army knew Sgt. 1st Class Ikaika Kang had shown support for Islamic State years ago. It even took away his security clearance for a while.

But he stayed in the service, deploying to Afghanistan in 2013.

Then, last weekend, the FBI arrested the 34-year-old on terrorism charges following a yearlong investigation, shortly after Kang declared his loyalty to the terrorist group and exclaimed that he wanted to “kill a bunch of people,” according to authorities.

The case highlights the challenges investigators face with protecting the public from a potentially dangerous actor on one hand and gathering sufficient evidence to enable prosecution on the other.