The estranged son of a respected Boston police captain was arrested July 4 by the FBI as a possible domestic terrorist.

Alexander Ciccolo of Adams, Mass., was taken into custody after buying guns from an undercover FBI confidential informant, federal officials said. He is the 23-year-old son of Boston police Captain Robert Ciccolo.

"This is a very bad person arrested before he could do very bad things," one senior federal official told ABC News.

Ciccolo had bought two pistols and two rifles from the undercover agent. At his apartment, federal officials found possible bomb making equipment including a pressure cooker and "attack planning papers," among other things. He was going by the name Abu Ali al-Amriki and according to neighbors was a recent convert to Islam.

According to an FBI affidavit, Ciccolo had 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 location of the attack was later changed to a town with a state university and was to be concentrated on "college dorms and cafeteria, to include executions of students, which would be broadcast live via the Internet."

Ciccolo's father is a veteran commander assigned to operations at Boston Police headquarters, and was one of the first responders to the Boston Marathon bombing. According to the FBI, the younger Ciccolo said he was "inspired" by the April 2013 bombing and the use of pressure cooker bombs. The older Ciccolo alerted counter-terrorism authorities roughly a year ago that his estranged son "was going off of the deep end" and "spouting extremist jihadist sympathies."

The younger Ciccolo is scheduled to be in court in Springfield, Mass., Tuesday morning for a detention hearing. He 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 the Islamic State that had planned Fourth of July terror attacks. Ciccolo was one of those arrests, the officials said.