Every NFL team has adopted a code of fan conduct, requiring ticket holders to refrain from certain behaviors — and reserving the right to eject them if they fail to comply. In San Diego, a judge has found that policy to conflict with the First Amendment.

Though the legal action doesn’t directly challenge the legality of the code of conduct, Judge Gale Kaneshiro previously threw out battery charges brought against a fan who allegedly punched and bit a security guard while the guard was trying to remove the fan for yelling obscenities and flashing the middle finger to other fans. The judge reasoned that the fan had a right under the First Amendment to express obscenities, and that the fan had a right to defend himself when the guard tried to physically force the fan to leave.

Bernie Wilson of the Associated Press reports that, on Friday, the fan’s lawyer will present a motion to the court requesting that the fan’s arrest record be expunged. City attorney Jan Goldsmith is opposing the motion.

The NFL has filed an affidavit in support of Goldsmith’s position. Specifically, NFL security chief Jeffrey Miller said that the code of conduct has reduced incidents at games, and that it has faced no other legal challenges.

“What this is about is, does the NFL have the right to evict fans who violate the code of conduct? If the answer is no, then this fellow and other fans can simply say, ‘No, I’m not leaving,’ and they can use violence to avoid eviction,” Goldsmith said.

The fan’s lawyer, Mary Frances Prevost, disagrees. “You can’t print something on a ticket and call it a contract,” Prevost said. “It’s not enforceable. To have a contract, you have to have an offer and acceptance. What if they said, ‘We want you to dance and do three cartwheels when you walk through the door?’ You wouldn’t have to if you didn’t want to.”

But even if it’s not a contract, and even if the purchase of the ticket doesn’t amount to an acceptance of all of its terms and conditions, a ticket to a sporting event constitutes a license to enter and remain at the stadium. The owner of the premises and/or the operator of the event have the ability to place reasonable restrictions on that license, especially when the behavior of one licensee can impact in a negative way the experience of another licensee.

Besides, most municipalities have one law or another that would prevent the yelling of obscenities and/or the repeated flashing of the middle finger in a public place. Freedom of speech relates to the expression of ideas and opinions, not the unrestrained articulation of profanities.

Hopefully, Judge Kaneshiro will see the light. Even more hopefully, no one else will get the bright idea to try to challenge a provision that helps the league attract more people to choose paying for a ticket over watching the game at home, where the only obscenities are uttered by a drunken uncle moments before he passes out on the couch.