DETROIT (AP) — A Detroit-area man accused of being a vigorous supporter of the Islamic State group was sentenced Wednesday to nearly four years in prison for a weapons crime, dodging the government's plea for a longer punishment to protect the public.

Sebastian Gregerson was a "soldier" for IS, a violent Islamic militant group, and would have committed terrorism if he hadn't been arrested last year, Assistant U.S. Attorney Cathleen Corken said while seeking a five-year sentence.

But Gregerson's attorney said the government had greatly overstated its case. Gregerson, 30, pleaded guilty in March to possessing unregistered destructive devices.

"I don't know how dangerous you are. But I know your conduct to date has not created an action or event that could be called dangerous," U.S. District Judge Arthur Tarnow said.

Gregerson was sentenced to 45 months in prison. He'll also serve a nine-month sentence at the same time for a separate gun crime.

The FBI used an undercover operative to get close to Gregerson. Corken said he acquired 15 knives, 700 rounds of AK-47 ammunition, tactical gear and training manuals in 2015.

She said Gregerson's Facebook postings under a different name, emails and secretly recorded conversations revealed his allegiance to IS and praise for attacks in Paris and Orlando, Florida.

"It is chilling," Corken told the judge.

Gregerson declined to speak in court. Defense attorney David Tholen said there's no evidence of him targeting anyone for attack. He accused the government of "cherry-picking facts" and looking at his client with "tunnel vision."

"Mr. Gregerson and everyone in the United States is entitled to unpopular speech," Tholen said.

___

Follow Ed White at http://twitter.com/edwhiteap