A young Wal-Mart employee in central Illinois torched an American flag and wound up in jail on the Fourth of July, but experts say police are the ones on the wrong side of the law and may well be on the hook for damages.

The Supreme Court twice has found the First Amendment allows for people to defile Old Glory -- knocking down state laws in its 1989 decision in Texas v. Johnson, followed by a 1990 ruling against a federal ban in U.S. v. Eichman.

But that didn’t prevent the Urbana Police Department from arresting Bryton Mellott, 22, on Monday and charging him with a felony under a state flag desecration law after he posted to Facebook photos of himself holding a flaming flag.

A message accompanying the photos condemned racism, sexism and the treatment of sexual minorities and the poor. “I do not have pride in my country. I am overwhelmingly ashamed, and I will demonstrate my feelings accordingly. #ArrestMe,” Mellott wrote.

Police claim they then received phone calls during the Independence Day holiday “request[ing] police action against Mellott” or expressing concern about his safety.

“After investigating the incident and speaking to both Mellott and his employer, Mellott was placed under arrest for flag desecration,” the department said in a statement. “The police report lists Mellott as an offender of both flag desecration and disorderly conduct as well as a victim of disorderly conduct.” Sgt. Andrew Charles told Forbes the disorderly conduct charge was used because Mellott was “causing others to be put at risk of harm.”

Police released Mellott from custody after consulting with the local prosecutor’s office and being told there were “questions about the constitutionality” of the flag desecration law, the release says. The department has not released a copy of the police report, for which it requires a Freedom of Information Act request.

Mellott was given a July 20 court date, but on Tuesday afternoon State’s Attorney Julia Rietz announced she would not pursue the charges -- a decision prominent scholars said was a no-brainer.

“The man clearly had a constitutional right to do what he did and cannot be punished for it, whether for flag discretion or for disorderly conduct,” says Geoffrey Stone, a law professor at the University of Chicago.

“Flag burning is a constitutionally protected act under the First Amendment,” says Jonathan Turley, a law professor at George Washington University. “It is an exercise of free speech. Moreover, if the act is protected, you cannot charge someone with the response of others to a protected act.”

Eugene Volokh, a UCLA law professor, says “it’s a clearly unconstitutional arrest."

As with the flag-desecration charge, the disorderly conduct count appeared to run afoul of well-established law, Volokh says.

“It seems that what they mean is if you post something that makes people upset with you and send threats to you, leading to police investigation and protection, then you’re committing a crime because of what the threateners are saying -- and that’s been clearly an impermissible theory since at least 1949” with the ruling in Terminiello v. City of Chicago , he says.

“Under this theory, any time anyone posts something sufficiently offensive to enough people, he can be prosecuted for disorderly conduct,” Volokh says. "That cannot be the law. That is not the law.”

A so-called heckler’s veto enforced by police targeting a threatened speaker rarely is permissible, but Mellott's conduct doesn't appear to meet that standard, experts say.

“In limited circumstances, police can actively intervene to protect a speaker from a hostile crowd. But cases of this sort typically involve an imminent threat to a speaker who is addressing an audience in real time and space,” says Timothy Zick, a law professor at the College of William and Mary.

“In any event, even in such cases, police arguably have an obligation to protect the speaker by arresting those communicating threats," he adds.

Zick says Mellott appears to have a good case for a false arrest lawsuit, which could entitle him to compensation for his brief confinement and damages for physical and emotional suffering, or even punitive damages, depending on specific facts.

Volokh says if Mellott sues, he would win.

“There would be an award, including an attorney’s fee award,” he says.

It’s unclear if Mellott remains a Wal-Mart employee or if he intends to sue the police department.