Denver (AP) - A law that makes it illegal to lie about being a war hero is unconstitutional because it violates free speech, a federal judge ruled Friday as he dismissed a case against a Colorado man who claimed he received two military medals.

Rick Glen Strandlof claimed he was an ex-Marine who was wounded in Iraq and received the Purple Heart and Silver Star, but the military had no record he ever served. He was charged with violating the Stolen Valor Act, which makes it a crime punishable by up to a year in jail to falsely claim to have won a military medal.

U.S. District Judge Robert Blackburn dismissed the case and said the law is unconstitutional, ruling the government did not show it has a compelling reason to restrict that type of statement.

A spokesman for the U.S. attorney in Denver said prosecutors are reviewing the decision and haven't decided whether to appeal. The spokesman said that decision would be made by the U.S. Justice Department in Washington and prosecutors in Denver.

Strandlof's lawyer didn't immediately return a call.

The law has also been challenged in California and an a case now before the 9th U.S. Circuit Court of Appeals.

Denver attorney Christopher P. Beall, who filed a friend-of-the-court brief for the American Civil Liberties Union of Colorado, said the Stolen Valor Act is fatally flawed because it doesn't require prosecutors to show anyone was harmed or defamed by the lie.

"The government position was that any speech that's false is not protected by the First Amendment. That proposition is very dangerous," Beall said.