The accused was trying to carry out an Islamic State terror group-inspired attack. (Representational)