CHICAGO (CBS) — A national guardsman from Aurora and his cousin were arrested Wednesday night, for allegedly conspiring to join the Islamic State terrorist group and attack a Joliet military facility.

Federal prosecutors said 22-year-old Army National Guard Spc. Hasan Edmonds, 22, was arrested at Midway International Airport, while trying to fly to Cairo, Egypt. His cousin, 29-year-old Jonas Edmonds, was arrested at his home in Aurora. Each has been charged with conspiring to provide material support and resources to a foreign terrorist organization.

A lengthy affidavit filed in federal court outlines the investigation that resulted in this week’s charges. Both suspects made appearances in federal court Thursday.

Prosecutors said the two planned for Hasan Edmonds to travel overseas, to use his military training to fight with the Islamic State, also known as ISIS or ISIL, while Jonas Edmonds would launch an attack on the National Guard facility where Hasan had been training. That facility is the Joliet headquarters for the 2nd Battalion, 129th Infantry.

According to court documents, an undercover FBI agent sent Hasan Edmonds a friend request on Facebook in late 2014, and in January, Hasan and the agent exchanged a series of messages on Facebook, and Hasan allegedly discussed plans to travel overseas with his cousin to fight with Islamic State extremists.

“The State has been established and it is our duty to heed the call,” he allegedly wrote. “I look forward to the training. I am alreadyin the american kafir [infidel] army …and now I wish only to serve in the army of Allah alongside my true brothers.”

In another message, he allegedly wrote, either he and his cousin would make it overseas, “or bring the flames of war to the heart od [sic] this land with Allahs permission.”

According to federal prosecutors, the National Guard facility in Joliet was the target of a terror plot hatched by two cousins from Aurora, including a National Guard soldier who trained at the facility. (Credit: CBS)

According to federal prosecutors, the National Guard facility in Joliet was the target of a terror plot hatched by two cousins from Aurora, including a National Guard soldier who trained at the facility. (Credit: CBS)

Hasan Edmonds allegedly discussed possible attacks on public buildings.

“It would be hard to pull off a lager [sic] scale attack on the government but police stations and courts are pretty easy and its [sic] been done before,” he allegedly wrote to the undercover agent.

Earlier this month, Hasan and Jonas allegedly met with a different undercover agent, and told the agent that Hasan planned to go overseas to join the Islamic State, and after he left, Jonas would buy weapons in the U.S. – including assault rifles and grenades – and attack the National Guard station where Hasan had been training.

Jonas allegedly told that agent “he anticipated a “body count” of 100 to 150 individuals.”

Hasan was arrested at Midway on Wednesday, after buying a ticket to fly to Cairo, via Detroit and the Netherlands. His cousin was arrested at his home.

The two were due in court Thursday afternoon.

Hasan Edmonds enlisted in the National Guard on Aug. 29, 2011, and served as a supply specialist. As a result of his arrest, his security clearance has been revoked, and if convicted, he will be discharged.

Gov. Bruce Rauner’s office said he was briefed Wednesday on the investigation, and impending arrest.

“Last night, I was informed that the Illinois National Guard soldier was arrested for alleged terrorist activities including attempting to join and assist ISIS and conspiring to facilitate other terrorist actions. I commend the Illinois National Guard and the Federal Bureau of Investigation for working together closely to apprehend this individual and his associates. On behalf of all citizens of Illinois, I thank all the members of our National Guard as well as the FBI for protecting our state and defending our country,” Rauner said in a written statement.

National Guard spokesman Lt. Col. Brad Leighton said he could not discuss specifics of the investigation.

“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. The Illinois National Guard plays a vital role in helping our neighbors, protecting our state and defending our nation. We are proud of the tremendous service and sacrifice our Soldiers, Airmen, and their Families have made since the terrorist attacks of Sept. 11, 2001. We will not let this incident detract us from fulfilling our missions as proud National Guard Citizen Soldiers,” he said in an email.

Leighton said Hasan Edmonds was not on active duty, so the criminal charges will be handled by federal prosecutors, not military authorities.

One relative of the suspects expressed shock at the arrests.

“I think that’s devastating,” Gloria Edmonds, the great-aunt for both men, tells CBS 2’s Chris Martinez. “I can’t believe that.”

She says both men were quiet.