BOSTON (AP) — The son of a Boston police captain has been arrested in an FBI sting and accused of plotting to commit terrorist acts in support of the Islamic State group, including the setting off of pressure-cooker bombs at an unidentified university and the slaughter of students live online.

Alexander Ciccolo’s own father alerted authorities last fall that the younger man had a long history of mental illness and was talking about joining the Islamic State, according to two law enforcement officials who spoke on condition of anonymity because they were not authorized to release details.

Ciccolo, 23, of Adams, was accused in a criminal complaint unsealed Monday with illegal possession of a firearm for receiving four guns July 4 from a person cooperating with the Western Massachusetts Joint Terrorism Task Force. Because of a drunken driving conviction, Ciccolo was barred from possessing a gun.

Ciccolo’s father, Robert Ciccolo, is a 27-year veteran of the Boston police.

“While we were saddened and disappointed to learn or our son’s intentions, we are grateful that authorities were able to prevent any loss of life or harm to others,” Ciccolo’s parents said in a statement.

In court papers, the FBI said Ciccolo had talked with the cooperating witness in recorded conversations in June about his plans to commit acts inspired by the Islamic State.

Ciccolo initially talked about killing civilians, police officers and members of the U.S. military, but later said he instead wanted to attack a state university outside of Massachusetts because more people would be at a school, according to the FBI. The FBI said the attack would include executions of students, broadcast live online.

On July 3, the day before his arrest, agents watched Ciccolo at Wal-Mart buying a pressure cooker similar to those used in the 2013 Boston Marathon bombings, the FBI said.

His attorney, David Hoose, did not immediately return calls for comment.

Ciccolo first came to the attention of the terrorism task force on Sept. 11 last year, when a close acquaintance — identified by the two law enforcement officials as Ciccolo’s father — told the FBI that Ciccolo “had expressed a desire to go overseas and fight for ISIL,” according to court papers.

The acquaintance told the FBI that Ciccolo had a long history of mental illness and in the last 18 months “had become obsessed with Islam.” The person also told the FBI he had received texts from Ciccolo in which he said America was “Satan” and Americans were disgusting.

The FBI said Ciccolo told the cooperating witness he planned to attack the university using assault rifles and explosives, focusing on dorms and the cafeteria during the lunchtime because it would be packed with people.

He also allegedly said that if a student was a Muslim, “he would be permitted to help, sit tight or leave.” Ciccolo told the witness that the Boston Marathon bombing gave him the idea of using pressure-cooker bombs, the FBI said.

Ciccolo is scheduled to appear in federal court in Springfield on Tuesday for a bail hearing.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.