ON THURSDAY, the Supreme Court struck down, in a 6 to 3 ruling, the Stolen Valor Act of 2005, which declared it a federal misdemeanor to falsely present oneself as a decorated military officer. Likely to be overlooked in the wake of the Obamacare decision, the Court’s ruling in United States v. Alvarez is nevertheless a commendable reinforcement of the First Amendment and its sanctity.

The case that became United States v. Alvarez began in 2007, when Xavier Alvarez, a California man, falsely and deliberately declared himself a retired Marine with 25 years of service and the “Congressional Medal of Honor.” He was tried and convicted in a California court under the terms of the Stolen Valor Act, a decision the U.S. Court of Appeals for the 9th Circuit overturned. Ultimately, the issue before the Supreme Court was the legitimacy of content-based restrictions on speech, and the court was right to strike down a law that dangerously imposed on an individual’s constitutionally guaranteed right to the freedom of speech, even to lie.

In the dissenting opinion, Justice Samuel A. Alito Jr. — joined by Justices Clarence Thomas and Antonin Scalia — raised objections with which it is easy to sympathize. Lies like Mr. Alvarez’s, they wrote, undermine “our country’s system of military honors” at the same time as they inflict “real harm on actual medal recipients and their families.” This is undeniable, but the lies the court has protected are, as Justice Anthony M. Kennedy noted in the majority opinion, a function of the “sometimes inconvenient principles of the First Amendment.” But it is precisely in tolerating “inconvenient” speech that the First Amendment is tested and must be upheld.

Leaving the Stolen Valor Act in place would have essentially authorized the government to make a list of subjects about which false statements couldn’t be said, even in private, even in a whisper. In a deft allusion to George Orwell’s “1984,” Justice Kennedy warned of the act’s lack of any clear limiting principle: “Our constitutional tradition stands against the idea that we need Oceania’s Ministry of Truth.” As reprehensible as statements like Mr. Alvarez’s may be, the court was correct: Criminalizing certain types of speech is not the answer. If, as Justice Kennedy began the majority opinion, lying was Mr. Alvarez’s “habit,” it must also be considered — albeit uncomfortably — his right.

This is not to say that Mr. Alvarez and others who lie about military service don’t deserve rebuke for insulting those who serve and their families. They do. It’s just best that such discipline come from the public, not the law, and that the freedoms for which real Marines fight continue to be treated as sacred.