Hasan Edmonds, a 23-year-old native of Illinois and former member of the National Guard, has pleaded guilty to charges of conspiring to launch terrorist attacks against the U.S. He also pleaded guilty to the charge of attempting to launch attacks against the American military. He joins his cousin, Jonas Edmonds, in the plea.

The Edmonds cousins had been planning to attack the U.S. and have been communicating with members of the Islamic State of Iraq for some time, according to the Daily Herald.

They were first discovered when they tried to communicate with other Islamic State members and sympathizers online. As they were trying to communicate, they ran into a covert FBI agent, who first pretended to be an ISIS sympathizer. The FBI was able to continue the ruse until it accumulated enough evidence to put both men away, according to an FBI press release.

While Jonas planned to bomb American military bases on U.S. territory, Hasan planned to travel to Iraq to provide ISIS with support on the ground.

To help Jonas with his plan, Hasan provided him with lists of senior military personnel that could be targeted in violent actions against the American military. To achieve his aim, Jonas had even gone so far as to book his air ticket to Cairo. Hasan planned to make his way to ISIS from Cairo. He was arrested just as he was about to board his flight to Cairo from Midway Airport in Chicago. Jonas was then arrested a few hours later.

If they were to be sentenced on these charges, Jonas could be sentenced up to 21 years in prison. Based on the charges filed against him, Hasan could be sentenced up to 30 years in prison and fined up to $500,000, according to the International Business Times.