A U.S. Army National Guard soldier and his cousin have been charged with conspiring to support ISIS, federal prosecutors say.

Army National Guard Specialist Hasan Edmonds, 22, and Jonas Edmonds, 29, both from the suburban Chicago community of Aurora, are accused of plotting to provide material support and resources to the terror organization, U.S. Attorney Zachary Fardon announced Thursday.

They also allegedly planned to use Army uniforms and military knowledge to attack a U.S. military facility in northern Illinois.

According to a criminal complaint filed Wednesday, the pair allegedly devised a plan in late 2014 for Hasan Edmonds to travel overseas and use his military training to fight on behalf of ISIS. As part of the plan, Hasan Edmonds booked a flight scheduled to leave Wednesday from Chicago and arrive in Cairo Thursday.

Both men also met with an FBI undercover employee to present a plot to carry out an armed attack against the military facility where Hasan Edmonds had been training, according to the complaint. As part of the plan, Jonas Edmonds and the undercover officer would use Hasan Edmonds’ uniforms and his knowledge of the facility to access the grounds and target officers for the attack.

“Disturbingly, one of the defendants currently wears the same uniform of those they allegedly planned to attack,” Assistant Attorney General for National Security John P. Carlin said in a statement.

Hasan Edmonds was arrested at Midway Airport during an attempt to fly to Egypt, and Jonas Edmonds was arrested at his home in Aurora, prosecutors say. Both were charged with conspiring to provide material support and resources to a foreign terrorist organization.

"We will pursue and prosecute with vigor those who support ISIL and its agenda of ruthless violence," said U.S. Attorney Fardon. "Anyone who threatens to harm our citizens and allies, whether abroad or here at home, will face the full force of justice."

Conspiring to provide material support to a foreign terrorist organization carries a maximum penalty of 15 years in prison and a $250,000 fine.

"Upon learning of the investigation, our effortsand priorities focused on ensuring the safety of our Soldiers, Airmen, and their Families," said Brad Leighton, public affairs director for the Illinois National Guard. "We have remained in communication with federal authorities throughout the process, which culminated in the arrest by federal officers of Hasan Rasheed Edmonds last night."