A federal law making it a crime to lie about receiving the Medal of Honor or other military decorations violates freedom of speech, a federal appeals court ruled Tuesday.

Although a Southern California water board member convicted of violating the Stolen Valor Act made "deliberate and despicable" claims that he had received the Medal of Honor, the Constitution prohibits the government from prosecuting someone for merely lying, the Ninth U.S. Circuit Court of Appeals in San Francisco said in a 2-1 ruling.

"The right to speak and write whatever one chooses - including, to some degree, worthless, offensive and demonstrable untruths - without cowering in fear of a powerful government is, in our view, an essential component of the protection afforded by the First Amendment," Judge Milan Smith said in the majority opinion.

If lying about a medal can be classified as a crime, Smith said, so can lying about one's age, misrepresenting one's financial status on Facebook, or telling one's mother falsehoods about drinking, smoking or sex.

Dissenting Judge Jay Bybee said the Constitution does not protect knowingly false speech. He said the lies told by Xavier Alvarez "dishonor ... every service member who has been decorated in any way, and every American now serving."

Alvarez, elected in 2006 to the Three Valley Water District board in Pomona (Los Angeles County), introduced himself at a public meeting in July 2007 as a retired Marine who was awarded the Medal of Honor two decades before.

The court described him as a congenital liar who had never served in the armed forces but had repeatedly claimed to have been awarded military decorations. Alvarez also described himself falsely as a former police officer and pro hockey player, the court said.

Alvarez was the first person ever prosecuted under a 2006 federal law that prohibits falsely claiming to have won a military decoration. It is punishable by up to six months in prison, or a year for elite awards such as the Medal of Honor.

He pleaded guilty and was sentenced to probation, fined $5,000 and ordered to perform 416 hours of community service. His lawyer said he completed the community service but, in an unrelated case, was convicted last year of misappropriating public funds and was sentenced to five years in state prison.

A Palm Springs man who tried to impress former classmates at his high school reunion in Concord by showing up in a Marine Corps uniform encrusted with bogus medals pleaded guilty to the same crime last year. Steven Douglas Burton, 39, who had never served in the military, was sentenced to a year of probation and fined $250.

Jonathan Libby, a deputy federal public defender who represented Alvarez, said the Ninth Circuit "upheld the First Amendment in a very difficult case."

Prosecutors could ask the full appeals court for a rehearing.

In Tuesday's ruling, the court said the government can carry out the stated purpose of the Stolen Valor Act, to preserve the "reputation and meaning" of military honors, by publicizing the names of genuine recipients and false claimants.

There is no reason to assume that the meaning of military decorations "is harmed every time someone lies about having received one," said Smith, who like Bybee was appointed by former President George W. Bush.

"Every nation needs to honor heroes," Bybee countered. "The harm flowing from those who have crowned themselves unworthily is surely self-evident."

Read the ruling at links.sfgate.com/ZKDP.