Two Montana men accused of lying about being military veterans to try and get lesser prison sentences were told they won't be eligible for parole until they complete a writing assignment honoring real military heroes. 

Ryan Patrick Morris, 28, and Troy Allan Nelson, 33, both claimed they were veterans to try and get their cases moved to a Veterans Court in apparent attempts to get preferential treatment, according to the Associated Press

Both men were sentenced for separate crimes last week by Cascade County District Judge Greg Pinski. Morris got a 10 year sentence for violation the terms of his probation for a burglary and Nelson got five years for drug possession, the AP reported. 

But it was the unusual requirements that the judge tacked on that got everyone's attention. 

Pinski said that before either men could be eligible for parole they'd have to hand-write the names of all 6,756 Americans killed in Iraq and Afghanistan, according to the Great Falls Tribune. Both men were also sentenced to hand-write the obituaries of the 40 Montanans killed in those wars and send letters of apology to several veterans groups. 

Once out on parole, both men must go to the Montana Veterans Memorial on Memorial Day and Veterans Day, during the suspended portions of their sentences, and wear a sign that reads: "I am a liar. I am not a veteran. I stole valor. I dishonored all veterans," NBC affiliate KRTV reports.

Attorneys for both men objected to the sign condition, with one of the attorneys arguing that his client had not been charged with stolen valor but was being punished for it, according to the AP. 

RELATED: New study focuses on stigma veterans face when accessing mental health resources

RELATED: 'It's become a community icon': Veterans memorial to be rebuilt after being destroyed by a car crash

The judge pushed back on that assertion and said he was punishing the men for lying to the court. 

Pinski told the defendants that their behavior was "abhorrent to the men and women who have actually served our country,” the Great Falls Tribune reported. “You’ve not respected the veterans. You’ve not respected the court. And you haven’t respected yourselves.” 

He also assigned both men 441 hours of community service, one hour for each Montana resident who has died since the Korean War. 

1030486702
American Soldiers and US Flag. US troops
Getty Images/iStockphoto