An Illinois Army National Guard soldier vowed to bring "the flames of war to the heart" of America if he was unable to get to the Middle East to join the Islamic State group, and his cousin bragged that he could kill at least 150 people in a terrorist attack in the U.S., federal prosecutors said Thursday in announcing their arrests.

Hasan R. Edmonds, the 22-year-old guardsman, was arrested Wednesday night at Chicago Midway International Airport while trying to board a plane for the first leg of a journey that eventually would take him to Egypt. Jonas M. Edmonds, 29, was arrested earlier that day at his home, the U.S. attorney's office in Chicago said in a statement. Both men are U.S. citizens from the Chicago suburb of Aurora.

According to an unsealed federal complaint, Jonas Edmonds planned to carry out an attack in the U.S. after Hasan Edmonds left the country. Without naming it, complaint says they contemplated an armed attack against a U.S. military facility in northern Illinois where Hasan Edmonds had trained.

In Internet messages to an undercover FBI agent in January, Hasan Edmonds said that if he was unable to make it to the Middle East, he would help bring "the flames of war to the heart" of America and "cause as much damage and mayhem as possible," prosecutors allege.

On Tuesday, the cousins drove to a military installation with an undercover agent to discuss an attack, according to the complaint, which does not name the facility. Hasan Edmonds described the types of rooms inside and talked about which ones should and shouldn't be hit.

Hasan said in messages earlier this year that his knowledge of the U.S. military and American psychology would prove helpful in terrorizing Americans, prosecutors contend. He suggested not just killing people, but capturing and holding others.

"If we can break their spirits, we will win," he said, according to the complaint.

Another time, he spoke admiringly of the recent terrorist attack in Paris on the satirical magazine Charlie Hebdo, which killed 12 people.

"Honestly, we would love to do something like the brother in Paris did," Hasan Edmonds wrote, according to prosecutors.

Jonas Edmonds, who the complaint says had a criminal record in the state of Georgia, allegedly communicated to an undercover agent that it may be difficult for him to get his travel documents in order. Therefore, he said he would eagerly stage attacks in the U.S. using AK-47s and other weapons with the aim of killing up to 150 people, prosecutors allege.

And if he could not secure guns, he would use anything he could get his hands on, the complaint cites him as saying.

"I can unleash a lion," he says. "What I would need ... honestly nothing. I am prepared to go even if it's with a rock."

The cousins appeared before U.S. Magistrate Judge Sheila Finnegan in federal court in Chicago on Thursday. Lawyers who represented the men at the hearing declined to comment afterward.

Illinois Gov. Bruce Rauner said Thursday that Adjunct General Daniel M. Krumrei and Illinois Public Safety Director Rodger Heaton briefed him about an investigation on Wednesday. He provided no further details.

"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 the brief statement.

Spokesman Lt. Col. Brad Leighton said the Illinois National Guard was informed of a federal investigation into a member of Golf Company 634th Brigade Support Battalion, which is based in Joliet.

"Upon learning of the investigation our efforts and priorities focused on ensuring the safety of our soldiers, airmen and their families," he said. "We have remained in communication with federal authorities throughout the process."

Leighton said the Illinois National Guard has played a central role in protecting the United States 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.

Hasan Edmonds wasn't on active duty, so any criminal allegation will be addressed by civilian federal authorities, Leighton said. Edmonds security clearance had been revoked, he said.

Associated Press writer Caryn Rousseau contributed to this report.