RALEIGH, N.C. (CBS/AP) -- A man who pled guilty to plotting to shoot hundreds of people on behalf of the Islamic State of Iraq and Syria (ISIS) received a life sentence Tuesday in a case that prosecutors say illustrates the dangers of Americans radicalized through social media.

Justin Nojan Sullivan, 21, received the sentence in federal court in Asheville after pleading guilty late last year to the foiled plot to attack a nightclub or concert and film it for distribution on terrorist sites.

In a statement, the Court said that Sullivan's plan was similar to the Orlando nightclub attack in 2016 that left 49 people dead. They considered the plan more sinister because he planned to use a mask to hide his identity along with a silencer to kill as many people as possible. The Court called the plan "cold and calculating."

Sullivan was a teenager in the small foothills town of Morganton when he became radicalized in 2014 after watching terrorist beheadings and other Islamic State propaganda online, U.S. Attorney Jill Westmoreland Rose said Tuesday.

Authorities say Sullivan admitted to having frequent contact online with a prominent Islamic State recruiter and propagandist in Syria, the now-dead Junaid Hussain. Sullivan agreed to Hussain's request to make a video of his planned attack so that it could be used online for recruitment, Rose said.

"They know this is a way to win the hearts and minds of American youth or those who may be disenfranchised in some way," Rose told reporters after the sentencing hearing. "Certainly the use of social media by foreign terrorist organizations, particularly ISIS, is one of the ways that they're most effective." ISIS is an alternative acronym for the Islamic State group.

Sullivan, who was arrested at his parents' house in June 2015, planned to buy a semi-automatic rifle at a gun show to kill hundreds of people at a concert or nightclub near where he lived in western North Carolina, Rose said.

MORE: Read the full story at CBSNEWS.com