SAN FRANCISCO — A federal appeals court has tossed out a veteran’s conviction for wearing military medals he didn’t earn.

A specially convened 11-judge panel of the 9th U.S. Circuit Court of Appeals ruled Monday that wearing unearned military honors is free speech protected by the First Amendment of the Constitution.

Elven Joe Swisher of Idaho was convicted of violating the Stolen Valor Act. Investigators looked into his 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.

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’s attorney didn’t return a phone call Monday.