A teenager from South Carolina pleaded guilty Wednesday of attempting to provide the Islamic State of Iraq and Syria with material support, the Justice Department announced.

Zakaryia Abdin, a 19-year-old U.S. citizen, first launched a social media account in 2017 to try to join ISIS and later communicated with an undercover FBI employee that he thought was associated with ISIS.

Abdin told the FBI employee that he had vowed his loyalty to the caliphate and shared a video of a separate pledge to the leader of ISIS, commander Abu Bakr al Baghdadi. Abdin claimed in the video to “wage jihad against the enemy of Allah.”

Abdin also signaled he wanted to serve in combat for the caliphate and claimed that he was experienced with an assortment of weapons.

In March 2017, Abdin scheduled a flight to Jordan from the Charleston International Airport, and notified the FBI employee of his travel plans. Abdin was stopped at the airport and was subsequently arrested.

“Abdin’s attempt to provide material support to ISIS by traveling overseas put American lives at risk,” assistant attorney general for national security John Demers said in a statement. “That is unacceptable, and I applaud the dedicated agents and prosecutors who stopped him and have achieved this successful outcome.”

“The most important job of government is protecting the people of the United States from harm, whether it comes from criminals or terrorists,” U.S. attorney for the District of South Carolina Sherri Lydon said in a statement. “This case is an example of law enforcement doing exactly that. The threat to our safety continues to be very real.”

Abdin is facing a statutory maximum sentence of 20 years behind bars.