A member of the Islamic State terrorist group waves an ISIS flag in Raqqa, Syria, June 29, 2014. (REUTERS/Stringer) (Stringer/Reuters)

Justin Sullivan plotted to kill hundreds of people in North Carolina and Virginia on behalf of the Islamic State and wanted a silencer for a gun. So he had one built from a flashlight and delivered to the Morganton, N.C., house he shared with his parents. When his parents asked what he planned to do with it, he tried to have them killed.

The person he offered to pay to kill his parents and who sent him the silencer was an undercover FBI employee. Sullivan, 20, admitted his plot on Tuesday, pleading guilty in federal court in North Carolina to attempting to commit acts of terrorism.

According to court documents, Sullivan began watching videos of Islamic State beheadings and other atrocities on his laptop in September 2014.

He converted to Islam, announced his support for the Islamic State to his parents and destroyed some of their religious objects.

“I liked IS from the beginning then I started thinking about death and stuff so I became Muslim,” he later told the FBI employee, the indictment in the case said.

By June 2015, Sullivan had made contact with Junaid Hussain, an Islamic State recruiter who was reported killed in a drone strike in Syria two months later. A British hacker-turned-militant, Hussain encouraged several attempted terrorist attacks in the United States. A Kosovo-based hacker passed along personal information about U.S. military personnel to Hussain.

According to authorities, Hussain asked Sullivan to film a video of his deadly attack for use by the Islamic State.

Sullivan agreed. “I’ll kill people this month,” he told the FBI agent on June 7, 2015. Sullivan said he would carry out his attack in a bar, club or concert, where he hoped to kill as many as 1,000 people. Court documents do not say if he identified a specific target.

He was arrested two weeks later.

Sullivan is also suspected of killing a 74-year-old neighbor, John Bailey Clark, to get enough money to finance his terrorist attack, authorities said. They said Sullivan admitted that he stole a .22-caliber rifle from his stepfather’s gun cabinet.

Forensic testing linked the rifle to Clark’s death.

According to court documents, Sullivan also said that the $689 he planned to use to buy an AR-15 rifle and ammunition at a gun show came from Clark. But he has not confessed to the murder.

Prosecutors said Sullivan has agreed to a sentence of life in prison, which is the maximum penalty for attempting to commit terrorism.