A 19-year-old suburban Denver woman who tried to go to Syria to help Islamic State militants was sentenced to four years in prison Friday, even as she tearfully told a judge that she never wanted to hurt anyone and has disavowed jihad.

Shannon Conley told the judge she was misled while pursuing Islam and learned only after her arrest about atrocities committed by the extremists she was taught to respect.

"I am glad I have learned of their true identity here and not on the front lines," said Conley, whose black and tan headscarf clashed against her striped jail uniform. "I disavow these radical views I've come to know and I now believe in the true Islam in which peace is encouraged."

But U.S. District Judge Raymond P. Moore said he doubted Conley's views had changed, and she needs psychological help. He also sentenced her to three years of supervised release and 100 hours of community service and barred her from possessing black powder used in explosives, saying, "I'm not going to take a chance with you."

"I don't know what has been crystalized in your mind," Moore told her, adding that he hoped the sentence would discourage others with similar intentions. "I'm still not sure you get it."

The three-hour hearing offered the fullest picture to date of Conley, who pleaded guilty in September to one count of conspiracy to provide material support to a foreign terrorist organization. Prosecutors sought the four-year sentence, rather than the maximum penalty of five years, because was helpful and cooperative in ongoing investigations.

Conley was arrested in April as she boarded a plane she hoped would ultimately get her to Syria, where wanted to marry a suitor she met online who told her he was fighting with the extremists. She told FBI agents she wanted to fight alongside him or use her skills as a certified nurse's aide to help.

FBI agents became aware of her interest in jihad in late 2013, after she started talking about terrorism with members of a suburban Denver church. They met repeatedly with over several months, hoping to dissuade her. But she told them she was intent on waging jihad, even though she knew it was illegal.

"Even though I was committed to the idea of jihad, I didn't want to hurt anyone," Conley said Friday. "It was all about defending Muslims."

But Assistant U.S. Attorney Gregory Holloway also said Conley continues to defy authority, making vitriolic comments about law enforcement even though authorities showed restraint in their handling of her case. That's a troubling sign that she may reoffend, Holloway said.

Moore described her as an isolated high school dropout with almost no friends her own age and a strange obsession with the military. In jail, she met with an imam who came to counsel her about faith and left disturbed that she preferred to discuss jihad, Moore said.

And even before she was arrested, Moore said she was insolent and desperate for attention, wearing a T-shirt that read "Sniper. Don't run, you'll die trying" on her first meeting with FBI agents.

"I'm not saying her actions were a direct product of mental illness, but she's a bit of a mess," Moore said. "She's pathologically naive."

Her case came as U.S. officials are putting new energy into trying to understand what radicalizes people far removed from the fight and trying to prod countries to do a better job of keeping them from joining up.

Federal defender Robert Pepin said Conley had grown, even changing her name as a show of her transformation. A lighter sentence would have shown others with similar intentions that "we really want them to be part of us again. That we are a beacon and not a sword."