A former National Guard soldier from Virginia has pleaded guilty to a terrorism charge after admitting that he traveled to Africa and boarded a truck to join the Islamic State group before ultimately bailing out.

Twenty-seven-year-old Mohamed Jalloh, of Sterling, was arrested in July after a sting operation in which he discussed launching a Fort Hood-style attack. At a plea hearing Thursday in federal court, new details emerged showing Jalloh made contact with the Islamic State before the government became aware of him.

Jalloh, a naturalized U.S. citizen, admitted Thursday that he traveled to his native Sierra Leone last year and connected with an Islamic State facilitator. While he backed out of traveling to join the Islamic State in Libya, he gave hundreds of dollars to support recruits.