PORTLAND, Ore. — A Washington state man who joined the Ammon Bundy-led takeover of an Oregon wildlife refuge sought and received leniency from a judge Tuesday after saying he’s been through “two years of hell” since his arrest in February 2016.

U.S. District Judge Anna Brown cited Darryl Thorn’s rough childhood and other factors in sentencing him to 18 months in prison — at least six months less than federal sentencing guidelines. Thorn will also get credit for time he has already served in jail.

Thorn performed armed guard duty, sometimes from a watchtower, during the Malheur National Wildlife Refuge occupation that lasted Jan. 2 to Feb. 11, 2016. The group sought the release of two ranchers imprisoned for setting fires on U.S.-owned land.

Twenty six people were indicted in the case. Most accepted plea bargains and avoided prison. Bundy and six others were acquitted in a trial last year.

Thorn was twice on the verge of accepting a plea bargain before changing his mind and going to trial earlier this year. Jurors convicted him in March of conspiracy and possessing a firearm.

“This has been extremely difficult — mentally, physically, emotionally,” Thorn told Brown. “I have a life. I have a family I would like to go back to.” Thorn has been in jail since June, when Brown revoked his conditional, pre-sentencing release because of suicidal threats.

Thorn’s lawyer, Jay Nelson, filed a sentencing memorandum that includes some details of his client’s childhood after he was born to a drug-addicted mother. Thorn’s abusive stepfather shackled him to a back porch for hours on end, securing his ankle with a heavy chain and padlock, the memorandum said.

Thorn was 12 when finally removed from the home and placed in foster care, Nelson wrote.

Prosecutor Ethan Knight agreed that Thorn’s upbringing was a mitigating factor but sought a sentence of more than two years, saying Thorn’s role standoff role was “sustained and dangerous.” Thorn encouraged others to stay and fight authorities after the fatal shooting by police of occupation spokesman Robert “LaVoy” Finicum, Knight said.

The judge urged Thorn to embrace mental health treatment while in prison and get an education.

“You’ve got to find a way to live in this world that does not seem threatening to other people,” she said.

Several supporters of Thorn were outside the courthouse during the sentencing hearing, including Duane Ehmer, a co-defendant who starts his one-year prison sentence in January.

Ehmer showed up on the horse named Hellboy that he rode during the standoff.

Inside the courtroom, Thorn was excited to hear that Ehmer arrived on the horse.

“That’s what I’m talking about!” Thorn told court spectators before the sentencing hearing started.