WASHINGTON -- Congress improperly criminalized lies about receiving military honors, the Supreme Court ruled on Thursday.

In striking down the Stolen Valor Act, the majority rejected the government's argument that the law, passed in 2006, was written narrowly enough to avoid chilling protected speech. However, the court left open the possibility of Congress crafting a better law, one that doesn't violate the First Amendment.

The decision in U.S. v. Alvarez affirms the ruling of the U.S. Court of Appeals for the 9th Circuit, which had invalidated Xavier Alvarez's conviction for introducing himself at a 2007 public meeting as a Medal of Honor recipient for his service in the Marines. Alvarez was an elected member of a Los Angeles-area water board -- and, as it turned out, a serial liar -- but he had not received that honor or, indeed, served in the military. He was one of the first individuals to be convicted under the Stolen Valor Act, passed in 2006.

Justice Anthony Kennedy wrote the plurality opinion, joined by Chief Justice John Roberts and Justices Ruth Bader Ginsburg and Sonia Sotomayor. Justices Stephen Breyer and Elena Kagan wrote to concur in the outcome.

"The Nation well knows that one of the costs of the First Amendment is that it protects the speech we detest as well as the speech we embrace," Kennedy wrote. "Though few might find respondent's statements anything but contemptible, his right to make those statements is protected by the Constitution's guarantee of freedom of speech and expression."

The plurality opinion rejected "the notion that false speech should be in a general category that is presumptively unprotected" by the First Amendment.

Kennedy made clear that the justices did not take lightly the sacrifices made by those who have been awarded the Medal of Honor. But he wrote, "The American people do not need the assistance of a government prosecution to express their high regard for the special place that military heroes hold in our tradition. Only a weak society needs government protection or intervention before it pursues its resolve to preserve the truth. Truth needs neither handcuffs nor a badge for its vindication."

Writing for the dissent, Justice Samuel Alito did not share his colleagues' concerns about a slippery slope created by the Stolen Valor Act.

"The plurality additionally worries that a decision sustaining the Stolen Valor Act might prompt Congress and the state legislatures to enact laws criminalizing lies about 'an endless list of subjects.' The plurality apparently fears that we will see laws making it a crime to lie about civilian awards such as college degrees or certificates of achievement in the arts and sports," Alito wrote in an opinion joined by Justices Antonin Scalia and Clarence Thomas.

But Alito concluded that Congress could appropriately distinguish lies about receiving the Medal of Honor from lies about "even the most prestigious civilian awards."

Erin Mershon contributed to this report.

Also on HuffPost: