Adams, Mass. -- The estranged son of a respected Boston police captain was arrested July 4 by FBI agents as part of a counter-terrorism operation against alleged ISIS-inspired domestic terrorists, federal officials told ABC News today.

Alexander Ciccolo, 23, of Adams, Mass., was taken into custody on gun charges after buying two pistols and two rifles from an undercover FBI confidential informant, federal officials said. In a search of his apartment, officials reported they found it loaded with possible bomb-making equipment including a pressure cooker, a variety of chemicals, an alarm clock, along with “attack planning papers” and “jihad” paperwork. FBI agents said he used the name Abu Ali al-Amriki and neighbors said he was a recent convert to Islam.

“This is a very bad person arrested before he could do very bad things,” one senior federal official briefed on the arrest told ABC News.

According to the FBI, Ciccolo attempted to stab a nurse in the head with a pen during a routine screening, “leaving a hole in the nurse’s skin.”

An FBI affidavit said Ciccolo initially planned to travel to “another state” and use a pressure cooker bomb “to conduct terrorist attacks on civilians, members of the U.S. military and law enforcement personnel.” The FBI said the attack location was later changed to a town with a state university and would be concentrated on “college dorms and cafeteria, to include executions of students, which would be broadcast live via the internet.”

Ciccolo’s father is Boston police Captain Robert Ciccolo, a veteran commander assigned to Operations at Boston Police headquarters who was one of those to respond to the deadly Boston Marathon bombing in April 2013. According to the FBI, the younger Ciccolo said he was “inspired” by the Marathon bombing and the use of pressure cooker bombs, and told the FBI undercover operative, “Allahu Akbar!!! I got the pressure cooker today.”

Law enforcement officials said Capt. Ciccolo alerted counter-terrorism authorities about a year ago that his son, with whom he had had minimal contact for several years, “was going off the deep end” and “spouting extremist jihadist sympathies.”

According to the affidavit of an FBI agent, the younger Ciccolo recently stated that he is, “not afraid to die for the cause," and that he characterized America as ”Satan” and “disgusting.”

Capt. Ciccolo did not respond to a request for comment but late Monday the Ciccolo family posted a statement on the Boston Police Department's website.

"While we were saddened and disappointed to learn of our son's intentions, we are grateful that authorities were able to prevent any loss of life or harm to others," the statement reads. "At this time, we would ask that the public and the media recognize our grief and respect our desire for privacy."

According to the FBI affidavit, Ciccolo posted a photo of a dead American soldier and wrote, “Thank you Islamic State. Now we won’t have to deal with these kafir back in America.” Kafir is a reference to non-believers of Islam. In a meeting with an FBI cooperating witness, Ciccolo praised the recent terror attack on a beach resort in Tunisia that killed 39 people, according to the FBI affidavit. “Awesome. Awesome, you that ah, that brother in Tunisia was impressive,” Ciccolo allegedly said.

The younger Ciccolo is scheduled to be in court in Springfield, Massachusetts Tuesday morning for a detention hearing. He was quietly arraigned last Monday on the gun charges, according to documents filed in federal court today. Ciccolo has been held at the Wyatt federal lockup in Rhode Island since his arrest.

Last week FBI Director James Comey said agents had arrested more than 10 people with suspected ties to ISIS and that the busts foiled planned Fourth of July attacks.

“I do believe that our work disrupted efforts to kill people, likely in connection with July 4th,” Comey said.

Ciccolo’s arrest was among the ones that interrupted a planned attack, the officials said.

Prior to allegedly becoming an ISIS sympathizer, Ciccolo was photographed attending an anti-nuclear "peace walk" in 2012.

Jun Yasuda, a Buddhist who walked with Ciccolo in July 2012, told ABC News Ciccolo appeared to be “concerned about peace… and understood about non-violent protest.”

“We walked together after Fukushima, and he realized that he had an open mind and that people were wonderful,” Yasuda said.

Michele McPhee is a Boston-based freelance journalist and frequent contributor to ABC News. ABC News' Alexander Hosenball contributed to this report.