Mr. Morris had been on probation for felony burglary, according to The Great Falls Tribune. In 2016, he told the same judge that he was a veteran with a disability who had participated in seven combat tours. He was sentenced to 441 hours of community service for a veterans’ organization. But he served only 10 hours, one of several violations of his probation that emerged on Friday. He was newly sentenced to 10 years in prison, with three of those years suspended.

Mr. Nelson had been on probation for a drug possession conviction, according to The Associated Press. He was enrolled in a veterans treatment court , which is part of the court system and works to help former service members, before it was revealed that he had not served in the military, The Great Falls Tribune reported. Because of several new violations of his probation, he was sentenced on Friday to five years in prison with three of those years suspended.

Before each man can be eligible for parole, he must complete his writing assignments. In addition to writing the names and the obituaries, both were ordered to send handwritten letters of apology to several veterans’ groups. Once they are released from prison, they must hold the placards on each Memorial Day and Veterans Day for the length of their probation, which will be at least three years.

Failing to hold the signs as ordered could cause them to be sent back to prison.

In court, a lawyer for Mr. Morris, Mark Frisbie , said the sentence violated his client’s dignity. He also argued that his client was being sentenced for stolen valor, which is a federal crime, even though he had not been charged with that crime.

“I wish I would have objected more strenuously,” Mr. Frisbie said in an interview on Wednesday. Mr. Nelson’s lawyer could not be reached.