SUFFOLK, Va. (WVEC) -- A Suffolk man has pleaded guilty on Wednesday to attempting to give financial support to ISIS.

Lionel Williams, 27, tried to send money to a person he believed was an ISIS financier on two occasions. He believed the money would be used to kill.

According to court documents, Williams became interested in ISIS starting in 2014. One day after the San Bernardino terrorist attack he bought an AK-47 assault riffle.

In March, Williams publicly declared his support for ISIS on social media. He also hoped ISIS would take over the United States, and he claimed he would decapitate any law enforcement agents he caught surveilling him.

The money he thought went to ISIS was actually a persona adopted by an FBI employee.

In 2016, Williams began discussing plans for a martyrdom operation with a woman living outside the United States, he asked an FBI confidential source to send him specific types of AK-47 ammunition, and told the FBI employee that his plan was for a "local" operation.

Not long after, he was arrested.

After his arrest, he told agents he supported ISIS and believed he was part of a “holy war.”

As part of the plea agreement, Williams agreed that he will receive the statutory maximum of 20 years in prison when sentenced on December 20.