A member of the National Guard was arrested Wednesday at a Chicago airport for attempting to head the Middle East to join ISIS, authorities said.

Army National Guard Specialist Hasan Edmonds, 22, a U.S. citizen, was arrested without incident at Chicago Midway International Airport by the FBI’s Joint Terrorism Task Force (JTTF) while attempting to fly to Cairo, Egypt, according to officials at the Department of Justice. Also arrested in connection with the case was Edmonds' cousin, Jonas Edmonds, 29, also a U.S. citizen. Both were charged in a criminal complaint filed yesterday in U.S. District Court of the Northern District of Illinois with one count of 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 Chicago’s U.S. Attorney Zach Fardon. “Anyone who threatens to harm our citizens and allies, whether abroad or here at home, will face the full force of justice.”

Prosecutors said Hasan Edmonds first came to the attention of the FBI in late 2014, and that a subsequent investigation revealed that both he and his cousin had devised a plan to get Hasan Edmonds to the Middle East for “the purpose of waging violence on behalf of ISIL.” As part of their plan, Hasan Edmonds booked a flight to Cairo on Wednesday. He was nabbed before he could board the plane.

The criminal complaint released on Thursday alleged that Jonas Edmonds intended to carry out his own acts of terrorism in the U.S. Their plans were uncovered after both had met with an undercover FBI agent who they had asked to assist in an armed attack of a U.S. military facility in northern Illinois.

“According to the charges filed today, the defendants allegedly conspired to provide material support to ISIL and planned to travel overseas to support the terrorist organization,” Assistant Attorney General John Carlin said in a statement released on Thursday. “In addition, they plotted to attack members of our military within the United States. Disturbingly, one of the defendants currently wears the same uniform of those they allegedly planned to attack.”

Both men made their first court appearance on Thursday afternoon.

A spokesman for the Illinois National Guard said that the security clearance for Hasan Edmonds had been revoked once they were made aware of the arrest.

Lt. Col. Brad Leighton, the public affairs director of the Illinois National Guard said Thursday that the Guard's focus was on "ensuring the safety of our soldiers, airmen and their families."

If convicted, both men could face a maximum penalty of 15 years in prison as well as a $250,000 fine for conspiring to provide material support to a foreign terrorist organization.

The Associated Press contributed reporting to this story.