(Reuters) – A U.S. Coast Guard lieutenant portrayed by prosecutors as a dangerous terrorist and by defense lawyers as a troubled addict was sentenced on Friday to 13 years in prison after pleading guilty to illegally possessing guns and opioid painkillers.

Christopher Paul Hasson, 50, has been in federal custody since his arrest nearly a year ago, when investigators found more than a dozen guns, hundreds of bullets and scores of Tramadol pills in his home in Silver Spring, Maryland.

Prosecutors had labeled Hasson a terrorist and a white supremacist, saying he made a list of people to shoot that included U.S. House of Representatives Speaker Nancy Pelosi and MSNBC host Joe Scarborough. They had asked Judge George Hazel of the U.S. District Court in Greenbelt, Maryland, to sentence Hasson to 25 years in prison.

Prosecutors did not charge him with conspiring to commit any violent crimes, however. In a plea agreement in August, Hasson admitted to unlawfully possessing firearms, gun silencers and Tramadol.

At his hearing on Friday, he said he was “embarrassed” by the racist, violent writings investigators found on his computer, the Huffington Post reported.

“I have never hurt anyone in my life and I was not planning to in any way, shape or form,” he told the judge, the Post reported.

His lawyers said Hasson was not planning any attacks but rather was in the grip of a years-long opioid addiction that created “significant mood disturbances,” according to a letter they wrote this month to the judge.

“Like many Americans, Mr. Hasson went through a difficult time in mid-life, when he became addicted to prescription opioids,” his lawyers wrote, saying he was taking three or four times the daily approved dose of Tramadol, a prescription-only medicine he ordered illegally online. “His criminal conduct arose out of this addiction.”

They had asked that Hasson be sentenced only to the time he has already served in prison and three years of supervised release.

In their sentencing memo for the judge, prosecutors quoted racist emails and draft documents they said Hasson had written on his computer in which he repeatedly advocated a violent race war.

“Much blood will have to be spilled to get whitey off the couch,” one typo-filled draft document said, which prosecutors described as a signed manifesto Hasson wrote in June 2017. “Have to take serious look at appropriate individual targets, to bring greatest impact. Professors, DR's, Politian's, Judges, leftists in general.”

In court on Friday, Hasson said he renounced his writings but was not claiming to be “magically cured of my biased thoughts,” the Post reported.

Hasson spent about $12,000 over three years amassing illegally obtained firearms and unregistered gun paraphernalia, prosecutors said.

U.S. Attorney Robert Hur said Hasson intended to inflict violence on the basis of his racist and hateful beliefs. “As long as violent extremists take steps to harm innocent people, we will continue to use all of the tools we have to prevent and deter them,” Hur said in a statement after the sentencing.