A homegrown sympathizer of ISIS and the Boston Marathon bombers — given up to the FBI by his police officer father — is expected to be sentenced Wednesday to 20 years in prison for terrorism crimes.

Alexander Ciccolo, 26, of Adams, the son of Boston police Capt. Robert Ciccolo, agreed to the sentence, with federal supervision for life, when he pleaded guilty in May to attempting to provide material support to a foreign terrorist organization, attempted use of weapons of mass destruction, being a prohibited person in possession of firearms and assault with a dangerous weapon.

“The government recognizes that Captain Ciccolo’s decision to come forward was heartbreaking,” federal prosecutors said in their sentencing memorandum filed Friday with U.S. District Court Judge Mark G. Mastroianni in Springfield. But they said the father’s “agonizing” choice “likely saved the lives of numerous innocent people.”

Social media put Ciccolo on the FBI’s radar in November 2014 when, according to federal prosecutors, he posted a preconviction picture of accused terrorist Dzhokhar Tsarnaev on his Facebook page with the words, “JUSTICE FOR JAHAR KEEP THE HOPE.”

Months later, Ciccolo unwittingly met with a government source in Pittsfield, where he shared his plans to travel to another state with three other individuals to conduct terrorist attacks on civilians in bars, a university campus and a police station using assault rifles and pressure-cooker bombs packed with ball bearings, nails, glass and rocks.

When Ciccolo was arrested on July 4, 2015, prosecutors said he was carrying four firearms he had just purchased from the government source. In his wallet was a Walmart receipt for a pressure cooker prosecutors said he’d purchased the day before.

His attorney, David Hoose, told Mastroianni in his sentencing report that Ciccolo began abusing drugs and alcohol at age 13 and “was an extraordinarily lonesome young man.”