SAN FRANCISCO -- A federal appeals court on Monday tossed out a veteran's conviction for wearing military medals he didn't earn, saying it was a form of free speech protected by the Constitution.

A specially convened 11-judge panel of the 9th U.S. Circuit Court of Appeals ruled that the First Amendment allows people to wear unearned military honors.

Elven Joe Swisher of Idaho was convicted in 2007 of violating the Stolen Valor Act, which made it a misdemeanor to falsely claim military accomplishments. President George W. Bush signed it into law in 2006, but the U.S. Supreme Court struck it down in 2012 as a violation of free speech protections.

Investigators looked into Swisher's military claims after he testified at the 2005 trial of a man charged with soliciting the murder of a federal judge. Swisher wore a Purple Heart on the witness stand.

Swisher testified that David Roland Hinkson offered him $10,000 to kill the federal judge presiding over Hinkson's tax-evasion case. Swisher said Hinkson was impressed after Swisher boasted that he killed "many men" during the Korean War.

Prosecutors say Swisher enlisted in the Marine Corps a year after the Korean War ended but was never wounded in the line of duty. Swisher was honorably discharged in 1957, and discharge documents indicate that he didn't receive any medals, according to the 9th Circuit ruling.

During his 2007 trial, prosecutors showed the jury a photograph of Swisher wearing several military medals and awards, including the Silver Star, Navy and Marine Corps Ribbon, Purple Heart, and the Navy and Marine Corps Commendation Medal with a Bronze "V."

Swisher's attorney Joseph Horras of Boise, Idaho, couldn't immediately be reached for comment Monday.

After the Stolen Valor Act was struck down, Congress passed a new law making it a crime to profit financially by lying about military service. President Barack Obama signed it in 2013.

After Swisher's conviction, Congress removed a provision making it illegal to wear unearned medals.

Stay on Top of Your Veteran Benefits

Military benefits are always changing. Keep up with everything from pay to health care by subscribing to Military.com, and get access to up-to-date pay charts and more with all latest benefits delivered straight to your inbox.